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="gm-form-element">
|
||||||
<div className={[
|
<div className={[
|
||||||
(className ? className : ""),
|
(className ? className : ""),
|
||||||
@ -12,6 +12,7 @@ export default ({type, name, placeholder, value = '', error, onInput, required,
|
|||||||
value={ value }
|
value={ value }
|
||||||
onInput={ (e) => onInput(e, name) }
|
onInput={ (e) => onInput(e, name) }
|
||||||
required={ required }
|
required={ required }
|
||||||
|
disabled={ disabled }
|
||||||
className={[
|
className={[
|
||||||
(value ? "gm-input-filled" : ""),
|
(value ? "gm-input-filled" : ""),
|
||||||
(error ? "gm-error" : "")
|
(error ? "gm-error" : "")
|
||||||
|
Loading…
Reference in New Issue
Block a user