styled.ts 967 B

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