@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS
46 lines (42 loc) • 1.52 kB
TypeScript
import { DialogContentProps } from '@radix-ui/react-dialog';
import { AllHTMLAttributes, ReactNode } from 'react';
import { B as ButtonProps } from './Button.types-Dt-FZKMg.js';
import { P as PaperProps } from './Paper.types-NMDyV2Rb.js';
declare enum Positions {
Absolute = "absolute",
Fixed = "fixed"
}
declare const DEFAULT_POSITION = Positions.Fixed;
type CombinedRefs = {
container: HTMLDivElement | null;
content: HTMLDivElement | null;
trigger: HTMLButtonElement | null;
};
interface DialogProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'onToggle' | 'title'> {
children: ReactNode;
closeButtonLabel?: string;
condensed?: boolean;
contentClassName?: string;
defaultOpen?: boolean;
disabled?: boolean;
dismissable?: boolean;
fullHeight?: boolean;
fullWidth?: boolean;
modal?: boolean;
open?: boolean;
overlayStyle?: 'dark' | 'light' | 'none';
position?: `${Positions}`;
root?: Partial<AllHTMLAttributes<HTMLDivElement>>;
scrollable?: boolean;
scrollbarOnHover?: boolean;
title?: ReactNode;
trigger?: ReactNode;
wrapper?: Partial<PaperProps>;
onClose?: () => void;
onDismiss?: ButtonProps['onClick'];
onInteractOutside?: DialogContentProps['onInteractOutside'];
onOpen?: () => void;
onPointerDownOutside?: DialogContentProps['onPointerDownOutside'];
onToggle?: (open: boolean) => void;
}
export { type CombinedRefs as C, DEFAULT_POSITION as D, Positions as P, type DialogProps as a };