placeholder shortcuts (#4637)

This commit is contained in:
Jaco Greeff 2021-02-09 14:19:35 +01:00 committed by GitHub
parent f30eace962
commit 013e10f487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 16 deletions

View File

@ -168,11 +168,7 @@ function Upload ({ onClose }: Props): React.ReactElement {
isError={!isWasmValid}
label={t<string>('compiled contract WASM')}
onChange={_onAddWasm}
placeholder={
wasm && !isWasmValid
? t<string>('The code is not recognized as being in valid WASM format')
: null
}
placeholder={wasm && !isWasmValid && t<string>('The code is not recognized as being in valid WASM format')}
/>
)}
<InputName

View File

@ -134,11 +134,7 @@ function Propose ({ className, onClose }: Props): React.ReactElement<Props> {
isError={!isWasmValid}
label={t<string>('validation code')}
onChange={_setWasm}
placeholder={
wasm && !isWasmValid
? t<string>('The code is not recognized as being in valid WASM format')
: null
}
placeholder={wasm && !isWasmValid && t<string>('The code is not recognized as being in valid WASM format')}
/>
<InputFile
help={t<string>('The genesis state for the parachain.')}

View File

@ -75,11 +75,7 @@ function RegisterThread ({ className, onClose }: Props): React.ReactElement<Prop
isError={!isWasmValid}
label={t<string>('code')}
onChange={_setWasm}
placeholder={
wasm && !isWasmValid
? t<string>('The code is not recognized as being in valid WASM format')
: null
}
placeholder={wasm && !isWasmValid && t<string>('The code is not recognized as being in valid WASM format')}
/>
</Modal.Column>
<Modal.Column>

View File

@ -20,7 +20,7 @@ export interface InputFilePropsBase {
isError?: boolean;
isFull?: boolean;
label: React.ReactNode;
placeholder?: React.ReactNode | null;
placeholder?: React.ReactNode | null | false;
withEllipsis?: boolean;
withLabel?: boolean;
}