import * as React from 'react' import { cva, type VariantProps } from 'class-variance-authority' import { cn } from '@/lib/utils' const heroVariants = cva('py-24 px-6', { variants: { variant: { centered: 'text-center', 'left-aligned': 'text-left', split: 'text-left', }, background: { default: 'bg-background', muted: 'bg-muted', accent: 'bg-primary/5', dark: 'bg-foreground text-background', }, }, defaultVariants: { variant: 'centered', background: 'default', }, }) interface HeroProps extends React.ComponentProps<'section'>, VariantProps { heading: React.ReactNode subheading?: React.ReactNode actions?: React.ReactNode media?: React.ReactNode } function Hero({ className, variant, background, heading, subheading, actions, media, children, ...props }: HeroProps) { const isSplit = variant === 'split' return (

{heading}

{subheading && (

{subheading}

)} {actions && (
{actions}
)} {children}
{isSplit && media && (
{media}
)}
) } export { Hero, heroVariants }