diff options
Diffstat (limited to 'animism-align/frontend/common/form.component.js')
| -rw-r--r-- | animism-align/frontend/common/form.component.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/animism-align/frontend/common/form.component.js b/animism-align/frontend/common/form.component.js index f3775a2..2f9162e 100644 --- a/animism-align/frontend/common/form.component.js +++ b/animism-align/frontend/common/form.component.js @@ -8,8 +8,9 @@ export const TextInput = props => ( type="text" required={props.required} onChange={props.onChange} + onBlur={props.onBlur} name={props.name} - value={props.data[props.name]} + value={props.data[props.name] || ""} placeholder={props.placeholder} autoComplete={props.autoComplete} /> @@ -17,7 +18,7 @@ export const TextInput = props => ( ) export const LabelDescription = props => ( - <label className={'text description'}> + <label className={props.className ? 'text description ' + props.className : 'text description'}> <span>{props.title}</span> <span>{props.children}</span> </label> @@ -160,7 +161,7 @@ export class FileInputField extends Component { <span>{title}</span> <div className="row"> <button> - {label || "Choose files"} + {label || (multiple ? "Choose files" : "Choose file")} <FileInput mime={mime} multiple={multiple} |
