@baseplate-dev/ui-components
Version:
Shared UI component library
27 lines • 2.11 kB
TypeScript
import type * as React from 'react';
import { Dialog as DialogPrimitive } from 'radix-ui';
/**
* A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
*
* ShadCN changes:
* - Added custom width property to specify the width of the dialog.
* - Added max-h-[90vh] overflow-y-auto to ensure the dialog is scrollable.
* - Wrap dialog content in an overlay to allow scrolling within other components e.g. combobox. (https://github.com/radix-ui/primitives/issues/3353#issuecomment-2664085003)
*
* https://ui.shadcn.com/docs/components/dialog
*/
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.ReactElement;
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.ReactElement;
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.ReactElement;
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.ReactElement;
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.ReactElement;
export type DialogWidth = 'sm' | 'md' | 'lg' | 'xl' | 'none';
declare function DialogContent({ className, children, width, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
width?: DialogWidth;
}): React.ReactElement;
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.ReactElement;
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.ReactElement;
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.ReactElement;
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.ReactElement;
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
//# sourceMappingURL=dialog.d.ts.map