UNPKG

@payfit/unity-components

Version:

48 lines (47 loc) 2.77 kB
import { VariantProps } from '@payfit/unity-themes'; export declare const funnelPageActions: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:flex uy:flex-col uy:gap-200 uy:md:flex-row uy:md:justify-between", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:flex uy:flex-col uy:gap-200 uy:md:flex-row uy:md:justify-between", unknown, unknown, undefined>>; export interface FunnelPageActionsProps extends VariantProps<typeof funnelPageActions> { /** * Render function for the next action. This is mandatory as it's the only action that's always shown. */ renderNext: () => React.ReactNode; /** * Render function for the previous action. Only rendered if provided. */ renderPrevious?: () => React.ReactNode; /** * Render function for optional actions (like skip). Only rendered if provided. */ renderOptionalActions?: () => React.ReactNode; } /** * The `FunnelPageActions` component provides a structured way to render funnel page actions. * It manages the layout and rendering of previous, next, and optional actions with proper spacing and responsive design. * @param {FunnelPageActionsProps} props - The props for the `FunnelPageActions` component * @example * ```tsx * import { FunnelPageActions } from '@payfit/unity-components' * * function Example() { * return ( * <FunnelPageActions * renderNext={() => <Button variant="primary">Next</Button>} * renderPrevious={() => <Button variant="secondary">Previous</Button>} * renderOptionalActions={() => <Button variant="ghost">Skip</Button>} * /> * ) * } * ``` * @remarks * - Automatically adapts layout based on screen size (mobile vs desktop) * - Provides consistent spacing between action groups * - Uses render functions for maximum flexibility in action content * - Automatically sets DataDog's session replay privacy to `data-dd-privacy="allow"` * @see {@link FunnelPageActionsProps} 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-funnelpageactions--docs unity-components.payfit.io} */ declare const FunnelPageActions: import('react').ForwardRefExoticComponent<FunnelPageActionsProps & import('react').RefAttributes<HTMLDivElement>>; export { FunnelPageActions };