SlidingSidebar.styled.ts 858 B

123456789101112131415161718192021222324252627282930313233343536
  1. import styled from 'styled-components';
  2. export const Wrapper = styled.div<{ $open?: boolean }>(
  3. ({ theme, $open }) => `
  4. background-color: ${theme.default.backgroundColor};
  5. position: fixed;
  6. top: ${theme.layout.navBarHeight};
  7. bottom: 0;
  8. width: 37vw;
  9. right: calc(${$open ? '0px' : theme.layout.rightSidebarWidth} * -1);
  10. box-shadow: -1px 0px 10px 0px rgba(0, 0, 0, 0.2);
  11. transition: right 0.3s linear;
  12. z-index: 200;
  13. h3 {
  14. display: flex;
  15. justify-content: space-between;
  16. align-items: center;
  17. border-bottom: 1px solid ${theme.layout.stuffBorderColor};
  18. padding: 16px;
  19. }
  20. `
  21. );
  22. export const Content = styled.div<{ $open?: boolean }>(
  23. ({ theme }) => `
  24. background-color: ${theme.default.backgroundColor};
  25. overflow-y: auto;
  26. position: absolute;
  27. top: 65px;
  28. bottom: 16px;
  29. left: 0;
  30. right: 0;
  31. padding: 16px;
  32. `
  33. );