styled.ts 953 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import styled, { css } from 'styled-components';
  2. export const Component = styled('hr')<{
  3. light?: boolean;
  4. absolute?: boolean;
  5. orientation?: string;
  6. variant?: string;
  7. }>`
  8. height: 1px;
  9. margin: 6px 0;
  10. border: none;
  11. flex-shrink: 0;
  12. background-color: ${(props) =>
  13. props.light ? 'white' : ({ theme }) => theme.colors['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;