ConfirmDialog.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. import * as React from 'react';
  2. import type { ThemeConfig } from '../config-provider';
  3. import type { ModalFuncProps, ModalLocale } from './interface';
  4. export interface ConfirmDialogProps extends ModalFuncProps {
  5. prefixCls: string;
  6. afterClose?: () => void;
  7. close?: (...args: any[]) => void;
  8. /**
  9. * `close` prop support `...args` that pass to the developer
  10. * that we can not break this.
  11. * Provider `onClose` for internal usage
  12. */
  13. onConfirm?: (confirmed: boolean) => void;
  14. autoFocusButton?: null | 'ok' | 'cancel';
  15. rootPrefixCls?: string;
  16. iconPrefixCls?: string;
  17. /**
  18. * Only passed by static method
  19. */
  20. theme?: ThemeConfig;
  21. /** @private Internal Usage. Do not override this */
  22. locale?: ModalLocale;
  23. /**
  24. * Do not throw if is await mode
  25. */
  26. isSilent?: () => boolean;
  27. }
  28. export declare function ConfirmContent(props: ConfirmDialogProps & {
  29. confirmPrefixCls: string;
  30. }): React.JSX.Element;
  31. declare const ConfirmDialogWrapper: React.FC<ConfirmDialogProps>;
  32. export default ConfirmDialogWrapper;