|
|
|
@ -57,6 +57,11 @@ const Wrapper = styled.div`
|
|
|
|
|
|
|
|
|
|
const InputWrapper = styled.div``;
|
|
|
|
|
|
|
|
|
|
const InputLabel = styled.span`
|
|
|
|
|
padding-bottom: 4px;
|
|
|
|
|
color: ${colors.TEXT_SECONDARY};
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const ErrorLabel = styled.span`
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
font-size: ${FONT_SIZE.SMALLER};
|
|
|
|
@ -69,9 +74,23 @@ const StyledIcon = styled(Icon)`
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const Input = ({
|
|
|
|
|
type, autoComplete, autoCorrect, autoCapitalize, spellCheck, value, onChange, isSuccess, isWarning, isError, errorText,
|
|
|
|
|
type,
|
|
|
|
|
autoComplete,
|
|
|
|
|
autoCorrect,
|
|
|
|
|
autoCapitalize,
|
|
|
|
|
spellCheck,
|
|
|
|
|
value,
|
|
|
|
|
onChange,
|
|
|
|
|
isSuccess,
|
|
|
|
|
isWarning,
|
|
|
|
|
isError,
|
|
|
|
|
errorText,
|
|
|
|
|
inputLabel,
|
|
|
|
|
}) => (
|
|
|
|
|
<Wrapper>
|
|
|
|
|
{inputLabel && (
|
|
|
|
|
<InputLabel>{inputLabel}</InputLabel>
|
|
|
|
|
)}
|
|
|
|
|
<InputWrapper>
|
|
|
|
|
<StyledInput
|
|
|
|
|
type={type}
|
|
|
|
@ -124,6 +143,7 @@ Input.propTypes = {
|
|
|
|
|
isWarning: PropTypes.bool,
|
|
|
|
|
isError: PropTypes.bool,
|
|
|
|
|
errorText: PropTypes.string,
|
|
|
|
|
inputLabel: PropTypes.string,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Input;
|
|
|
|
|