123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- import styled, { css } from 'styled-components';
- import { color } from '../../constants/style';
- const baseStyles = css`
- border: 1.5px solid ${color.black38};
- border-radius: 4px;
- padding: 7px 15px;
- outline: none;
- transition: border 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;
- font-size: 14px;
- box-sizing: border-box;
- :disabled {
- color: ${color.black56};
- cursor: not-allowed;
- }
- `;
- export const Input = styled('input')<{
- error?: boolean;
- shouldFitContainer?: boolean;
- }>`
- ${baseStyles}
- width: ${props => (props.shouldFitContainer ? '100%' : 'auto')};
- ${props =>
- props.error
- ? css`
- border: 1.5px solid ${color.error};
- `
- : css`
- :focus {
- border: 1.5px solid ${color.primary};
- }
- `}
- `;
- export const TextArea = styled('textarea')<{
- error?: boolean;
- shouldFitContainer?: boolean;
- }>`
- ${baseStyles}
- height: 54px;
- width: ${props => (props.shouldFitContainer ? '100%' : 'auto')};
- ${props =>
- props.error
- ? css`
- border: 1.5px solid ${color.error};
- `
- : css`
- :focus {
- border: 1.5px solid ${color.primary};
- }
- `}
- `;
|