diff --git a/ui/src/components/input/index.js b/ui/src/components/input/index.js index ec0f0ce6..60f21fce 100644 --- a/ui/src/components/input/index.js +++ b/ui/src/components/input/index.js @@ -1,6 +1,45 @@ -const classNames = require('classnames'); +const composers = require('../../shared/composers'); +const constants = require('../../shared/constants'); +const fns = require('../../shared/functions'); const React = require('react'); -const styles = require('./style.css'); +const Styled = require('styled-components'); + +const { + baseBox +} = composers; + +const { + colors +} = constants; + +const { + rndId +} = fns; + +const { + default: styled +} = Styled; + +const StyledLabel = styled.label` + color: #464646; +`; + +const StyledInput = styled.input` + background: ${colors.background}; + display: block; + height: 50px; + padding-left: 15px; + padding-right: 15px; + visibility: visible; + width: 100%; + + ${baseBox()} + + :focus { + border-color: ${colors.borderSelected}; + outline: none; + } +`; const Input = ({ autoComplete, @@ -9,7 +48,7 @@ const Input = ({ className, disabled = false, form, - id, + id = rndId(), inputMode, label, list, @@ -29,23 +68,17 @@ const Input = ({ const _label = label || children; const _children = label && children ? children : null; - const cn = classNames( - className, - styles['input-group'] - ); - - const labelledby = `${styles.label}-label`; + const labelledby = `${rndId()}-label`; return ( -
-