miniHeader.tsx 899 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import styled from '@emotion/styled';
  2. export const DividerSpacer = styled('div')`
  3. width: 1px;
  4. background-color: ${p => p.theme.border};
  5. `;
  6. const MINI_HEADER_HEIGHT = 20;
  7. export const ScrollbarContainer = styled('div')`
  8. display: block;
  9. width: 100%;
  10. height: ${MINI_HEADER_HEIGHT + 50}px;
  11. & > div[data-type='virtual-scrollbar'].dragging > div {
  12. background-color: ${p => p.theme.textColor};
  13. opacity: 0.8;
  14. cursor: grabbing;
  15. }
  16. overflow-x: scroll;
  17. `;
  18. export const VirtualScrollbar = styled('div')`
  19. height: 8px;
  20. width: 0;
  21. padding-left: 4px;
  22. padding-right: 4px;
  23. position: sticky;
  24. top: ${(MINI_HEADER_HEIGHT - 8) / 2}px;
  25. left: 0;
  26. cursor: grab;
  27. `;
  28. export const VirtualScrollbarGrip = styled('div')`
  29. height: 8px;
  30. width: 100%;
  31. border-radius: 20px;
  32. transition: background-color 150ms ease;
  33. background-color: ${p => p.theme.textColor};
  34. opacity: 0.5;
  35. `;