styled.ts 789 B

123456789101112131415161718192021222324252627282930313233
  1. import styled, { css } from 'styled-components';
  2. import { color } from '../../constants/style';
  3. export const Component = styled('hr')<{light?: boolean; absolute?: boolean; orientation?: string; variant?: string}>`
  4. height: 1px;
  5. margin: 6px 0;
  6. border: none;
  7. flex-shrink: 0;
  8. background-color: ${props => (props.light ? 'white' : color['light-gray'])};
  9. ${props => (props.absolute ? css`
  10. position: absolute;
  11. bottom: 0;
  12. left: 0;
  13. width: 100%;
  14. ` : '')}
  15. ${props => (props.orientation === 'vertical' ? css`
  16. height: 100%;
  17. width: 1px;
  18. margin: 0 6px;
  19. ` : '')}
  20. ${props => (props.variant === 'inset' ? css`
  21. margin-left: 52px;
  22. ` : '')}
  23. ${props => (props.variant === 'middle' ? css`
  24. margin-left: 10px;
  25. margin-right: 10px;
  26. ` : '')}
  27. `;