You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shared.tsx 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import styled from 'styles'
  2. export const IconButton = styled('button', {
  3. height: '32px',
  4. width: '32px',
  5. backgroundColor: '$panel',
  6. borderRadius: '4px',
  7. padding: '0',
  8. margin: '0',
  9. display: 'grid',
  10. alignItems: 'center',
  11. justifyContent: 'center',
  12. outline: 'none',
  13. border: 'none',
  14. pointerEvents: 'all',
  15. cursor: 'pointer',
  16. '& > *': {
  17. gridRow: 1,
  18. gridColumn: 1,
  19. },
  20. '&:hover:not(:disabled)': {
  21. backgroundColor: '$hover',
  22. },
  23. '&:disabled': {
  24. opacity: '0.5',
  25. },
  26. variants: {
  27. size: {
  28. small: {
  29. '& > svg': {
  30. height: '16px',
  31. width: '16px',
  32. },
  33. },
  34. medium: {
  35. height: 44,
  36. width: 44,
  37. '& > svg': {
  38. height: '16px',
  39. width: '16px',
  40. },
  41. },
  42. large: {
  43. height: 44,
  44. width: 44,
  45. '& > svg': {
  46. height: '24px',
  47. width: '24px',
  48. },
  49. },
  50. },
  51. isActive: {
  52. true: {
  53. color: '$selected',
  54. },
  55. },
  56. },
  57. })