UNPKG

react-multistep-forms

Version:

Flexible and customizable multi-step form context for React with native React Hook Form integration.

16 lines 918 B
import type { ButtonProps } from "../../types/StepControlButtonType.ts"; /** * Renders a button that navigates to the previous step in a multi-step form. * * - If `children` is a string, renders a styled button. * - If `children` is a React element, clones it and injects the click handler and className. * - If on the first step, renders nothing. * * @param {ButtonProps} props - Props for the PrevButton component. * @param {React.ReactNode} props.children - Button content or custom element. * @param {string} [props.className] - Additional CSS classes. * @param {(event: React.MouseEvent<HTMLButtonElement>) => void} [props.onClick] - Optional click handler. * @returns {React.ReactElement | null} The rendered button or null. */ export declare const PrevButton: ({ children, className, onClick }: ButtonProps) => import("react/jsx-runtime").JSX.Element | null; //# sourceMappingURL=PrevButton.d.ts.map