AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import type { HeroSection } from '../types';
  2. import { Container, Eyebrow, ImagePlaceholder, SfButton } from '../ui';
  3. export function Hero({ section }: { section: HeroSection }) {
  4. const { eyebrow, headline, subheadline, primaryCta, secondaryCta } =
  5. section.content;
  6. const buttons = (
  7. <div className="mt-8 flex flex-wrap gap-3">
  8. <SfButton href={primaryCta.href}>{primaryCta.label}</SfButton>
  9. {secondaryCta && (
  10. <SfButton href={secondaryCta.href} variant="outline">
  11. {secondaryCta.label}
  12. </SfButton>
  13. )}
  14. </div>
  15. );
  16. if (section.variant === 'split') {
  17. return (
  18. <section id={section.id} className="scroll-mt-20">
  19. <Container className="grid items-center gap-10 py-16 md:grid-cols-2 md:py-24">
  20. <div>
  21. {eyebrow && <Eyebrow>{eyebrow}</Eyebrow>}
  22. <h1 className="sf-heading mt-4 text-4xl leading-[1.08] font-semibold text-balance sm:text-5xl lg:text-6xl">
  23. {headline}
  24. </h1>
  25. <p className="mt-5 max-w-md text-lg text-(--sf-muted)">
  26. {subheadline}
  27. </p>
  28. {buttons}
  29. </div>
  30. <ImagePlaceholder
  31. label={headline}
  32. className="aspect-[4/5] w-full md:aspect-square"
  33. />
  34. </Container>
  35. </section>
  36. );
  37. }
  38. return (
  39. <section id={section.id} className="scroll-mt-20 bg-(--sf-surface)">
  40. <Container className="flex flex-col items-center py-20 text-center md:py-28">
  41. {eyebrow && <Eyebrow>{eyebrow}</Eyebrow>}
  42. <h1 className="sf-heading mt-4 max-w-3xl text-4xl leading-[1.08] font-semibold text-balance sm:text-5xl lg:text-6xl">
  43. {headline}
  44. </h1>
  45. <p className="mt-5 max-w-xl text-lg text-(--sf-muted)">
  46. {subheadline}
  47. </p>
  48. <div className="flex justify-center">{buttons}</div>
  49. </Container>
  50. </section>
  51. );
  52. }