@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and TailwindCSS
42 lines (41 loc) • 1.42 kB
TypeScript
import { PaperProps } from "../Paper/Paper.types.js";
import { ButtonProps } from "../Button/Button.types.js";
import { Positions } from "./Dialog.constants.js";
import { AllHTMLAttributes, ReactNode } from "react";
import { DialogContentProps } from "@radix-ui/react-dialog";
//#region src/components/Dialog/Dialog.types.d.ts
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;
}
//#endregion
export { CombinedRefs, DialogProps };
//# sourceMappingURL=Dialog.types.d.ts.map