UNPKG

@yamada-ui/modal

Version:

Yamada UI modal component

54 lines (51 loc) 1.51 kB
import * as _yamada_ui_motion from '@yamada-ui/motion'; import { ButtonProps } from '@yamada-ui/button'; import { ThemeProps } from '@yamada-ui/core'; import { ReactNode } from 'react'; import { ModalProps } from './modal.js'; import '@yamada-ui/focus-lock'; import '@yamada-ui/portal'; import './modal-content.js'; interface DialogOptions { /** * The dialog cancel to use. */ cancel?: ButtonProps | ReactNode; /** * The dialog footer to use. */ footer?: ReactNode; /** * The dialog header to use. */ header?: ReactNode; /** * The dialog other to use. */ other?: ButtonProps | ReactNode; /** * The dialog success to use. */ success?: ButtonProps | ReactNode; /** * The callback invoked when cancel button clicked. */ onCancel?: (onClose: (() => void) | undefined) => void; /** * The callback invoked when other button clicked. */ onOther?: (onClose: (() => void) | undefined) => void; /** * The callback invoked when success button clicked. */ onSuccess?: (onClose: (() => void) | undefined) => void; } interface DialogProps extends Omit<ModalProps, keyof ThemeProps>, ThemeProps<"Dialog">, DialogOptions { } /** * `Dialog` is a component used to confirm or interrupt user actions. * * @see Docs https://yamada-ui.com/components/overlay/dialog */ declare const Dialog: _yamada_ui_motion.MotionComponent<"section", DialogProps>; export { Dialog, type DialogProps };