import React, { type ElementType, type HTMLAttributes, type ReactElement, type ReactNode, } from 'react' import classnames from 'classnames' import { Button, type ButtonProps } from '~components/ButtonV1' import { Heading } from '~components/Heading' import { type SceneProps } from '~components/Illustration' import { Text } from '~components/Text' import { type OverrideClassName } from '~components/types/OverrideClassName' import { assetUrl } from '~components/utils/hostedAssets' import { useMediaQueries } from '~components/utils/useMediaQueries' import styles from './BrandMoment.module.css' type VariantProps = { variant: 'informative' | 'success' | 'warning' } export type BrandMomentProps = { illustration: ReactElement header: ReactNode body?: ReactNode primaryAction?: ButtonProps secondaryAction?: ButtonProps tag?: ElementType text: { title: ReactNode subtitle?: ReactNode body?: ReactNode footer?: ReactNode } } & OverrideClassName> & VariantProps /** * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082061589/Brand+Moment Guidance} | * {@link https://cultureamp.design/?path=/docs/components-brand-moment--docs Storybook} */ export const BrandMoment = ({ variant, illustration, header, body, primaryAction, secondaryAction, tag, text, classNameOverride, ...restProps }: BrandMomentProps): JSX.Element => { const { queries } = useMediaQueries() const Tag = tag ?? 'main' return (
{header}
{illustration}
{text.subtitle && ( {text.subtitle} )} {text.title} {text.body && ( {text.body} )} {body &&
{body}
}
{primaryAction && (
)}
{text.footer && ( )} ) } BrandMoment.displayName = 'BrandMoment'