styled.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import styled, { css } from 'styled-components';
  2. import { color } from '../../constants/style';
  3. export const Wrapper = styled.div`
  4. display: inline-flex;
  5. align-items: center;
  6. `;
  7. export const Text = styled.span`
  8. font-size: 12px;
  9. margin: 8px;
  10. `;
  11. export const Input = styled.input`
  12. background-color: ${color['light-gray']};
  13. outline: none;
  14. border: none;
  15. width: 70px;
  16. height: 30px;
  17. text-align: center;
  18. box-sizing: border-box;
  19. padding: 5px;
  20. `;
  21. export const ArrowButton = styled('button')<{variant: string}>`
  22. height: 30px;
  23. width: 26px;
  24. outline: none;
  25. border: none;
  26. background-color: ${color['light-gray']};
  27. cursor: pointer;
  28. position: relative;
  29. display: flex;
  30. align-items: center;
  31. justify-content: center;
  32. ${props => (props.variant === 'left' ? css`
  33. border-top-left-radius: 4px;
  34. border-bottom-left-radius: 4px;
  35. margin-right: 1px;
  36. :after {
  37. content: '';
  38. width: 0;
  39. height: 0;
  40. border-top: 5px solid transparent;
  41. border-bottom: 5px solid transparent;
  42. border-right: 5px solid #000000;
  43. position: absolute;
  44. }
  45. :hover:after {
  46. border-right: 5px solid ${color.black38};
  47. }
  48. ` : css`
  49. border-top-right-radius: 4px;
  50. border-bottom-right-radius: 4px;
  51. margin-left: 1px;
  52. :after {
  53. content: '';
  54. width: 0;
  55. height: 0;
  56. border-top: 5px solid transparent;
  57. border-bottom: 5px solid transparent;
  58. border-left: 5px solid #000000;
  59. position: absolute;
  60. }
  61. :hover:after {
  62. border-left: 5px solid ${color.black38};
  63. }
  64. `)}
  65. `;