import { Breakpoint } from '@mui/material'; import { EditProps } from 'ra-ui-materialui'; import { PropsWithChildren } from 'react'; import { FieldValues } from 'react-hook-form'; type ResponsiveButtonProps = { label?: string; onClick: () => void; }; type CloseDialogFunction = () => void; type SubmitFunction = (values: FieldValues, closeDialog: CloseDialogFunction) => void; type EditInDialogButtonProps = PropsWithChildren & EditProps & ResponsiveButtonProps & { maxWidth: Breakpoint; fullWidth?: boolean; fullScreen?: 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, * e.g. from a `Datagrid` `rowClick` handler. 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 (e.g. by `rowClick`), where only the dialog surface is needed. * Defaults to false (renders the trigger button). */ hideTrigger?: boolean; }; declare function EditInDialogButton(props: EditInDialogButtonProps): JSX.Element; export { EditInDialogButton }; export type { EditInDialogButtonProps }; //# sourceMappingURL=EditInDialogButton.d.ts.map