mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-11 09:53:32 +03:00
Added support for disabled form elements
no-issue This can be used for a coupon input in future
This commit is contained in:
parent
88368d0d94
commit
b28f3a02d9
@ -1,4 +1,4 @@
|
||||
export default ({type, name, placeholder, value = '', error, onInput, required, className, children, icon}) => (
|
||||
export default ({type, name, placeholder, value = '', error, onInput, required, disabled, className, children, icon}) => (
|
||||
<div className="gm-form-element">
|
||||
<div className={[
|
||||
(className ? className : ""),
|
||||
@ -12,6 +12,7 @@ export default ({type, name, placeholder, value = '', error, onInput, required,
|
||||
value={ value }
|
||||
onInput={ (e) => onInput(e, name) }
|
||||
required={ required }
|
||||
disabled={ disabled }
|
||||
className={[
|
||||
(value ? "gm-input-filled" : ""),
|
||||
(error ? "gm-error" : "")
|
||||
|
Loading…
Reference in New Issue
Block a user