summaryrefslogtreecommitdiff
path: root/frontend/common/form.component.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-06-07 04:18:49 +0200
committerJules Laplace <julescarbon@gmail.com>2020-06-07 04:18:49 +0200
commit00a6735b02f62a1459d8bfc5c27eb2bc0d7084cd (patch)
tree9906dae75f1f1c6a3771f2e6d7b9e36f22cba43a /frontend/common/form.component.js
parentf5f22f7d77506ffe9c3723f4c958c1feabca6074 (diff)
font stylez!!!
Diffstat (limited to 'frontend/common/form.component.js')
-rw-r--r--frontend/common/form.component.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/frontend/common/form.component.js b/frontend/common/form.component.js
index fb5b26d..cc0607d 100644
--- a/frontend/common/form.component.js
+++ b/frontend/common/form.component.js
@@ -39,6 +39,26 @@ export const NumberInput = props => (
</label>
)
+export const ColorInput = props => (
+ <label className={props.error ? 'error color' : 'text color'}>
+ <span>{props.title}</span>
+ <input
+ type="color"
+ required={props.required}
+ onChange={props.onChange}
+ name={props.name}
+ value={props.data[props.name]}
+ />
+ <input
+ type="text"
+ required={props.required}
+ onChange={props.onChange}
+ name={props.name}
+ value={props.data[props.name]}
+ />
+ </label>
+)
+
export const TextArea = props => (
<label className={props.error ? 'textarea error' : 'textarea'}>
{props.title && <span>{props.title}</span>}