diff --git a/app/components/input.js b/app/components/input.js index a9917f2..7eef5f5 100644 --- a/app/components/input.js +++ b/app/components/input.js @@ -3,12 +3,14 @@ import React from 'react'; import styled from 'styled-components'; +import theme from '../theme'; + const getDefaultStyles = t => styled[t]` border-radius: ${// $FlowFixMe props => props.theme.boxBorderRadius}; border: none; background-color: ${// $FlowFixMe - props => props.theme.colors.inputBackground}; + props => props.bgColor || props.theme.colors.inputBackground}; color: ${// $FlowFixMe props => props.theme.colors.text}; padding: 15px; @@ -34,15 +36,26 @@ type Props = { disabled?: boolean, type?: string, step?: number, + bgColor?: string, }; -export const InputComponent = ({ inputType, onChange, ...props }: Props) => { +export const InputComponent = ({ + inputType, onChange, bgColor, ...props +}: Props) => { const inputTypes = { input: () => ( - onChange(evt.target.value)} {...props} /> + onChange(evt.target.value)} + bgColor={bgColor} + {...props} + /> ), textarea: () => ( -