Hero.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import React from 'react'
  2. import { fluidRange } from 'polished'
  3. import { css } from '@emotion/core'
  4. import { Button, Header } from '@/shared/components'
  5. type HeroProps = {
  6. backgroundImg: string
  7. }
  8. const Hero: React.FC<Partial<HeroProps>> = ({ backgroundImg }) => {
  9. return (
  10. <Header
  11. title="A user governed video platform"
  12. subtitle="Lorem ipsum sit amet, consectetur adipiscing elit. Proin non nisl sollicitudin, tempor diam."
  13. backgroundImg={backgroundImg}
  14. containerCss={css`
  15. font-size: 18px;
  16. line-height: 1.33;
  17. & h1 {
  18. ${fluidRange({ prop: 'fontSize', fromSize: '40px', toSize: '72px' })};
  19. line-height: 0.94;
  20. }
  21. margin: 0 calc(-1 * var(--global-horizontal-padding));
  22. `}
  23. >
  24. <div
  25. css={css`
  26. display: flex;
  27. margin-top: 40px;
  28. & > * {
  29. margin-right: 1rem;
  30. }
  31. `}
  32. >
  33. <Button
  34. containerCss={css`
  35. width: 116px;
  36. `}
  37. >
  38. Play
  39. </Button>
  40. </div>
  41. </Header>
  42. )
  43. }
  44. export default Hero