UNPKG

@snowball-tech/fractal

Version:

Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS

31 lines (28 loc) 947 B
import { DialogContentProps } from '@radix-ui/react-dialog'; import { AllHTMLAttributes, ReactNode } from 'react'; import { Positions } from './Dialog.constants.js'; type CombinedRefs = { container: HTMLDivElement | null; content: HTMLDivElement | null; trigger: HTMLElement | null; }; interface DialogProps extends AllHTMLAttributes<HTMLDivElement> { children: ReactNode; closeButtonLabel?: string; defaultOpen?: boolean; disabled?: boolean; dismissable?: boolean; modal?: boolean; open?: boolean; overlayStyle?: 'dark' | 'light' | 'none'; position?: `${Positions}`; root?: Partial<AllHTMLAttributes<HTMLDivElement>>; title?: string; onClose?: () => void; onDismiss?: () => void; onInteractOutside?: DialogContentProps['onInteractOutside']; onOpen?: () => void; onToggle?: (open: boolean) => void; trigger?: ReactNode; } export type { CombinedRefs, DialogProps };