From 4e5ddc1d57ba4f42314eb49ae57a9b67950be596 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 22 Nov 2017 22:38:34 +0900 Subject: Add keybindings form --- src/settings/components/ui/input.jsx | 35 +++++++++++++++++++-------------- src/settings/components/ui/input.scss | 37 +++++++++++++++++++++++------------ 2 files changed, 44 insertions(+), 28 deletions(-) (limited to 'src/settings/components/ui') diff --git a/src/settings/components/ui/input.jsx b/src/settings/components/ui/input.jsx index 9b6c229..5138411 100644 --- a/src/settings/components/ui/input.jsx +++ b/src/settings/components/ui/input.jsx @@ -3,32 +3,35 @@ import './input.scss'; class Input extends Component { + renderText(props) { + let inputClassName = props.error ? 'input-error' : ''; + return
+ + +
; + } + renderRadio(props) { - let inputClasses = 'form-field-input'; - if (props.error) { - inputClasses += ' input-error'; - } - return
+ let inputClassName = props.error ? 'input-error' : ''; + return
; } renderTextArea(props) { - let inputClasses = 'form-field-input'; - if (props.error) { - inputClasses += ' input-error'; - } - return
+ let inputClassName = props.error ? 'input-error' : ''; + return
-