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.7KB

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