import * as React from 'react'; import { RaRecord, SaveContextValue } from 'ra-core'; import { DeleteWithUndoButtonProps } from './DeleteWithUndoButton'; import { DeleteWithConfirmButtonProps } from './DeleteWithConfirmButton'; /** * Button used to delete a single record. Added by default by the of edit and show views. * * @typedef {Object} Props The props you can use (other props are injected if you used it in the ) * @prop {boolean} mutationMode Either 'pessimistic', 'optimistic' or 'undoable'. Determine whether the deletion uses an undo button in a notification or a confirmation dialog. Defaults to 'undoable'. * @prop {Object} record The current resource record * @prop {string} className * @prop {string} label Button label. Defaults to 'ra.action.delete, translated. * @prop {boolean} disabled Disable the button. * @prop {string} variant Material UI variant for the button. Defaults to 'contained'. * @prop {ReactElement} icon Override the icon. Defaults to the Delete icon from Material UI. * * @param {Props} inProps * * @example Usage in the of an form * * import * as React from 'react'; * import { Edit, DeleteButton, TopToolbar } from 'react-admin'; * * const EditActions = props => { * const { data, resource } = props; * return ( * * * /> * * ); * }; * * const Edit = props => { * return } {...props} />; * }; */ export declare const DeleteButton: (inProps: DeleteButtonProps) => React.JSX.Element | null; export type DeleteButtonProps = SaveContextValue & (({ mutationMode?: 'undoable'; } & DeleteWithUndoButtonProps) | ({ mutationMode?: 'pessimistic' | 'optimistic'; } & DeleteWithConfirmButtonProps)); declare const PREFIX = "RaDeleteButton"; declare module '@mui/material/styles' { interface ComponentsPropsList { [PREFIX]: Partial; } interface Components { [PREFIX]?: { defaultProps?: ComponentsPropsList[typeof PREFIX]; }; } } export {}; //# sourceMappingURL=DeleteButton.d.ts.map