react-multistep-forms
Version:
Flexible and customizable multi-step form context for React with native React Hook Form integration.
16 lines • 903 B
TypeScript
import type { ButtonProps } from "../../types/StepControlButtonType.ts";
/**
* Renders a button that submits the 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 not on the last step, renders nothing.
*
* @param {ButtonProps} props - Props for the SubmitButton 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 SubmitButton: ({ children, className, onClick }: ButtonProps) => import("react/jsx-runtime").JSX.Element | null;
//# sourceMappingURL=SubmitButton.d.ts.map