Header.style.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { makeStyles, StyleFn } from '../../utils'
  2. import { typography, colors, breakpoints, spacing } from '../../theme'
  3. export type HeaderStyleProps = {
  4. backgroundImg?: string
  5. }
  6. const container: StyleFn = (_, { backgroundImg }) => ({
  7. textAlign: 'left',
  8. color: colors.white,
  9. lineHeight: 1.33,
  10. height: 584,
  11. backgroundImage: `linear-gradient(0deg, black 0%, rgba(0,0,0,0) 100%), url(${backgroundImg})`,
  12. backgroundSize: 'cover',
  13. backgroundPosition: 'center',
  14. display: 'flex',
  15. flexDirection: 'column',
  16. justifyContent: 'flex-end',
  17. })
  18. const content: StyleFn = () => ({
  19. marginLeft: spacing.xxl,
  20. marginBottom: 85,
  21. maxWidth: '39.25rem',
  22. })
  23. const title: StyleFn = () => ({
  24. lineHeight: 1.05,
  25. letterSpacing: '-0.01em',
  26. fontWeight: 'bold',
  27. margin: 0,
  28. })
  29. const subtitle: StyleFn = () => ({
  30. maxWidth: '34rem',
  31. marginTop: spacing.m,
  32. })
  33. export const useCSS = (props: HeaderStyleProps) => ({
  34. container: makeStyles([container])(props),
  35. content: makeStyles([content])(props),
  36. title: makeStyles([title])(props),
  37. subtitle: makeStyles([subtitle])(props),
  38. })