diff --git a/client/src/components/atoms/Form/Input.module.scss b/client/src/components/atoms/Form/Input.module.scss index e3c0607..9535aec 100644 --- a/client/src/components/atoms/Form/Input.module.scss +++ b/client/src/components/atoms/Form/Input.module.scss @@ -39,7 +39,6 @@ .input { font-size: $font-size-base; font-family: $font-family-base; - font-weight: $font-weight-bold; color: $brand-black; border: none; box-shadow: none; @@ -62,7 +61,6 @@ font-family: $font-family-base; font-size: $font-size-base; color: $brand-grey-light; - font-weight: $font-weight-base; transition: .2s ease-out; opacity: .7; } @@ -86,6 +84,17 @@ // box-shadow: 0 0 0 1000px $brand-black inset; // transition: background-color 5000s ease-in-out 0s; // } + + // Size modifiers + &.small { + font-size: $font-size-small; + min-height: 33px; + padding: $spacer / 4; + + &::placeholder { + font-size: $font-size-small; + } + } } .select { @@ -114,6 +123,16 @@ outline: 0; font-family: $font-family-base; } + + &.small { + height: 32px; + padding-right: 2rem; + + // custom arrow + background-position: calc(100% - 14px) 1rem, calc(100% - 9px) 1rem, + 100% 0; + background-size: 5px 5px, 5px 5px, 2rem 3rem; + } } .radioGroup { @@ -165,26 +184,3 @@ display: flex; align-items: center; } - -// Size modifiers - -.inputSmall { - composes: input; - font-size: $font-size-small; - min-height: 32px; - padding: $spacer / 4; - - &::placeholder { - font-size: $font-size-small; - } -} - -.selectSmall { - composes: select; - height: 32px; - padding-right: 2rem; - - // custom arrow - background-position: calc(100% - 14px) 1rem, calc(100% - 9px) 1rem, 100% 0; - background-size: 5px 5px, 5px 5px, 2rem 3rem; -} diff --git a/client/src/components/atoms/Form/Input.tsx b/client/src/components/atoms/Form/Input.tsx index 3498d6a..ec5e026 100644 --- a/client/src/components/atoms/Form/Input.tsx +++ b/client/src/components/atoms/Form/Input.tsx @@ -1,7 +1,7 @@ -import cx from 'classnames' import React, { PureComponent, FormEvent, ChangeEvent } from 'react' import slugify from 'slugify' import DatePicker from 'react-datepicker' +import cx from 'classnames' import { ReactComponent as SearchIcon } from '../../../img/search.svg' import Help from './Help' import Label from './Label' @@ -31,6 +31,7 @@ interface InputProps { group?: any multiple?: boolean disabled?: boolean + small?: boolean } interface InputState { @@ -82,6 +83,7 @@ export default class Input extends PureComponent { onChange, value, disabled + small } = this.props const wrapClass = this.inputWrapClasses() @@ -92,7 +94,7 @@ export default class Input extends PureComponent {