BrowseView.style.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import styled from '@emotion/styled'
  2. import { CategoryPicker, InfiniteVideoGrid, Text } from '@/shared/components'
  3. import { ReactComponent as BackgroundPattern } from '@/assets/browse-bg-pattern.svg'
  4. import { colors, sizes, zIndex } from '@/shared/theme'
  5. import { NAVBAR_HEIGHT } from '@/components/Navbar'
  6. type IsAtTop = {
  7. isAtTop: boolean
  8. }
  9. export const GRID_TOP_PADDING = sizes(2, true)
  10. export const Header = styled(Text)`
  11. margin: 0 0 ${sizes(10)} 0;
  12. `
  13. export const StyledCategoryPicker = styled(CategoryPicker)<IsAtTop>`
  14. z-index: ${zIndex.overlay};
  15. position: sticky;
  16. /*Offset Category Picker by Navbar Height */
  17. top: ${NAVBAR_HEIGHT}px;
  18. padding: ${sizes(5)} ${sizes(8)} ${sizes(2)};
  19. margin: 0 calc(-1 * var(--global-horizontal-padding));
  20. background-color: ${colors.black};
  21. border-bottom: 1px solid ${(props) => (props.isAtTop ? colors.black : colors.gray[800])};
  22. `
  23. export const StyledInfiniteVideoGrid = styled(InfiniteVideoGrid)`
  24. padding-top: ${GRID_TOP_PADDING}px;
  25. `
  26. export const Container = styled.div`
  27. position: relative;
  28. padding-top: ${sizes(14)};
  29. `
  30. export const IntersectionTarget = styled.div`
  31. min-height: 1px;
  32. `
  33. export const StyledBackgroundPattern = styled(BackgroundPattern)`
  34. position: absolute;
  35. right: 0;
  36. z-index: ${zIndex.background};
  37. `