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.

panel.tsx 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import styled from 'styles'
  2. export const Root = styled('div', {
  3. position: 'relative',
  4. backgroundColor: '$panel',
  5. borderRadius: '4px',
  6. overflow: 'hidden',
  7. border: '1px solid $border',
  8. pointerEvents: 'all',
  9. userSelect: 'none',
  10. zIndex: 200,
  11. boxShadow: '0px 2px 25px rgba(0,0,0,.16)',
  12. variants: {
  13. isOpen: {
  14. true: {
  15. width: 'auto',
  16. minWidth: 300,
  17. },
  18. false: {
  19. height: 34,
  20. width: 34,
  21. },
  22. },
  23. },
  24. })
  25. export const Layout = styled('div', {
  26. display: 'grid',
  27. gridTemplateColumns: '1fr',
  28. gridTemplateRows: 'auto 1fr',
  29. gridAutoRows: '28px',
  30. height: '100%',
  31. width: 'auto',
  32. minWidth: '100%',
  33. maxWidth: 560,
  34. overflow: 'hidden',
  35. userSelect: 'none',
  36. pointerEvents: 'all',
  37. })
  38. export const Header = styled('div', {
  39. pointerEvents: 'all',
  40. display: 'flex',
  41. width: '100%',
  42. alignItems: 'center',
  43. justifyContent: 'space-between',
  44. borderBottom: '1px solid $border',
  45. position: 'relative',
  46. '& h3': {
  47. position: 'absolute',
  48. top: 0,
  49. left: 0,
  50. width: '100%',
  51. height: '100%',
  52. textAlign: 'center',
  53. padding: 0,
  54. margin: 0,
  55. display: 'flex',
  56. justifyContent: 'center',
  57. alignItems: 'center',
  58. fontSize: '13px',
  59. pointerEvents: 'none',
  60. userSelect: 'none',
  61. },
  62. variants: {
  63. side: {
  64. left: {
  65. flexDirection: 'row',
  66. },
  67. right: {
  68. flexDirection: 'row-reverse',
  69. },
  70. },
  71. },
  72. })
  73. export const ButtonsGroup = styled('div', {
  74. display: 'flex',
  75. })
  76. export const Content = styled('div', {
  77. position: 'relative',
  78. pointerEvents: 'all',
  79. overflowY: 'scroll',
  80. })
  81. export const Footer = styled('div', {
  82. overflowX: 'scroll',
  83. color: '$text',
  84. font: '$debug',
  85. padding: '0 12px',
  86. display: 'flex',
  87. alignItems: 'center',
  88. borderTop: '1px solid $border',
  89. })