udate textarea to use destructuring, fix styling
This commit is contained in:
@ -13,7 +13,7 @@ function Input ({ callback, type = 'text', disabled = false, readOnly = false, p
|
||||
disabled={disabled}
|
||||
readOnly={readOnly}
|
||||
placeholder={placeholder}
|
||||
onChange={({ target: { value }}) => callback(value)}
|
||||
onChange={({ target: { value } }) => callback(value)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ function Select ({ values, callback, disabled = false, readonly = false, selecte
|
||||
<select
|
||||
disabled={disabled}
|
||||
readOnly={readonly}
|
||||
onChange={({ target : { value }}) => callback(value)}
|
||||
onChange={({ target : { value } }) => callback(value)}
|
||||
>
|
||||
{values.map(([value, text]) => <option selected={selected === value}value={value}>{text}</option>)}
|
||||
</select>
|
||||
|
||||
@ -14,7 +14,7 @@ function TextArea ({ callback, cols = 20, rows = 2, disabled = false, readOnly =
|
||||
disabled={disabled}
|
||||
readOnly={readOnly}
|
||||
placeholder={placeholder}
|
||||
onChange={(event) => callback(event.target.value)}
|
||||
onChange={({ target : { value } }) => callback(value)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user