styled.ts 904 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import styled from 'styled-components';
  2. const style: Record<string, string> = {
  3. textfield: '',
  4. checkbox: `
  5. border-radius: 8px;
  6. :after {
  7. content: '';
  8. background-image: url('/icons/check-mark.svg');
  9. background-repeat: no-repeat;
  10. background-position: center;
  11. background-size: contain;
  12. width: 32px;
  13. height: 32px;
  14. opacity: 0.25;
  15. }
  16. `,
  17. radio: `
  18. border-radius: 100%;
  19. :after {
  20. content: '';
  21. background-color: black;
  22. border-radius: 50%;
  23. width: 50%;
  24. height: 50%;
  25. opacity: 0.25;
  26. }
  27. `,
  28. };
  29. export const TextBox = styled.div<{ type: string }>`
  30. width: 100%;
  31. height: 100%;
  32. background-color: rgba(51, 190, 219, 0.3);
  33. font-size: 1.4rem;
  34. color: rgba(0, 0, 0, 0.5);
  35. display: flex;
  36. justify-content: center;
  37. align-items: center;
  38. ${(props) => style[props.type]}
  39. `;
  40. export default TextBox;