import { Breakpoint } from '@mui/material'; import { ButtonProps, CreateButtonProps, CreateProps } from 'ra-ui-materialui'; import { PropsWithChildren } from 'react'; import { FieldValues } from 'react-hook-form'; type ResponsiveButtonProps = CreateButtonProps & ButtonProps & { label?: string; onClick?: () => void; disableFloatingButton?: boolean; }; type CloseDialogFunction = () => void; type SubmitFunction = (values: FieldValues, closeDialog: CloseDialogFunction) => void; type CreateInDialogButtonProps = PropsWithChildren & CreateProps & ResponsiveButtonProps & { maxWidth: Breakpoint; fullWidth?: boolean; fullScreen?: boolean; /** * Indicates whether the floating button should be disabled. * Default is false, this mean that the floating button will be displayed on small screens. * **If you have multiple buttons on the same page, they will be displayed over each other! ** */ disableFloatingButton?: boolean; scroll: 'paper' | 'body' | undefined; /** * Custom handler for the submit event, in this case you are responsible for closing the dialog. * @example * * const handleSubmit = (values, closeDialog) => { * console.log(values); // { title: 'Hello World' } * closeDialog(); * } * * * * * * */ onSubmit?: SubmitFunction; /** * Controlled open state. When provided, the dialog becomes externally controlled * (the internal state is ignored). Enables opening the dialog programmatically. * Omit to keep the default uncontrolled behavior. */ open?: boolean; /** * Called when the dialog should open or close. Use together with `open`. * Receives the next open state. */ onOpenChange?: (open: boolean) => void; /** * When true, the trigger button is not rendered. Useful when the dialog is driven * externally, where only the dialog surface is needed. Defaults to false. */ hideTrigger?: boolean; }; declare function CreateInDialogButton(props: CreateInDialogButtonProps): import("react/jsx-runtime").JSX.Element; export { CreateInDialogButton }; export type { CreateInDialogButtonProps }; //# sourceMappingURL=CreateInDialogButton.d.ts.map