import * as DialogPrimitive from "@radix-ui/react-dialog"; import React, { ReactNode } from "react"; export type DialogProps = React.ComponentProps; export function Dialog(props: DialogProps) { const { children, ...other } = props; return ( {children} ); } type DialogContentProps = React.ComponentProps; export const DialogContent = React.forwardRef( ({ children, ...props }, forwardedRef) => ( {children} ) ); type DialogHeaderProps = { title: React.ReactElement | string; subtitle: React.ReactElement | string; }; export function DialogHeader({ title, subtitle }: DialogHeaderProps) { return (
{subtitle}
); } export function DialogFooter(props: { children: ReactNode }) { return (
{props.children}
); } DialogContent.displayName = "DialogContent"; export const DialogTrigger = DialogPrimitive.Trigger; export const DialogClose = DialogPrimitive.Close;