UNPKG

@payfit/unity-components

Version:

78 lines (77 loc) 2.99 kB
import { VariantProps } from '@payfit/unity-themes'; import { PropsWithChildren, ReactNode } from 'react'; export declare const funnelPageHeader: import('tailwind-variants').TVReturnType<{ gradient: { default: { base: string; }; }; }, { base: string; hgroup: string; figure: string; figcaption: string; }, undefined, { gradient: { default: { base: string; }; }; }, { base: string; hgroup: string; figure: string; figcaption: string; }, import('tailwind-variants').TVReturnType<{ gradient: { default: { base: string; }; }; }, { base: string; hgroup: string; figure: string; figcaption: string; }, undefined, unknown, unknown, undefined>>; export interface FunnelPageHeaderProps extends PropsWithChildren<VariantProps<typeof funnelPageHeader>> { title: string; subtitle: ReactNode; style?: VariantProps<typeof funnelPageHeader>['gradient']; imageSlot?: React.ReactNode; imageSlotAltText?: string; } /** * The `FunnelPageHeader` component provides the header section of a funnel page with title, subtitle, and optional image. * It displays the page title and subtitle in a structured layout with a responsive design that adapts to different screen sizes. * You can control the gradient appearance using the `gradient` prop to indicate different states or contexts. * @param {FunnelPageHeaderProps} props - The props for the `FunnelPageHeader` component * @example * ```tsx * import { FunnelPageHeader } from '@payfit/unity-components' * * function Example() { * return ( * <FunnelPageHeader * title="Page Title" * subtitle="Page Subtitle" * style="warning" * imageSlot={<img src="image.jpg" alt="description" />} * imageSlotAltText="Image description" * /> * ) * } * ``` * @remarks * - Automatically provides accessibility attributes for screen readers * - Supports different gradient styles for visual context * - Responsive image display that adapts to screen size * - Automatically sets DataDog's session replay privacy to `data-dd-privacy="allow"` * @see {@link FunnelPageHeaderProps} for all available props * @see Source code in {@link https://github.com/PayFit/hr-apps/blob/master/libs/shared/unity/components/src/components/funnel-layout/parts GitHub} * @see Design specs {@link https://www.figma.com/design/poaMyU7abAgL9VRhx4ygyy/Unity-DS-%3E-Components-Library?node-id=10802-11500&m=dev Figma} * @see Design docs in {@link https://www.payfit.design/24f360409/p/88f9fc-funnel/b/24ca6f Payfit.design} * @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/layout-funnellayout-funnelpage-funnelpageheader--docs unity-components.payfit.io} */ declare const FunnelPageHeader: import('react').ForwardRefExoticComponent<FunnelPageHeaderProps & import('react').RefAttributes<HTMLElement>>; export { FunnelPageHeader };