UNPKG

shadcn-react

Version:
34 lines (33 loc) 1.79 kB
import { ComponentProps, MouseEvent } from 'react'; import { DialogCloseProps } from '@radix-ui/react-dialog'; import { Drawer as UiDrawer } from '../ui/drawer'; import { ButtonProps } from '../Button'; export type DrawerProp = ComponentProps<typeof UiDrawer> & { title?: React.ReactNode; description?: React.ReactNode; content?: React.ReactNode; children?: React.ReactNode; footer?: React.ReactNode; okText?: React.ReactNode; okProps?: ButtonProps; cancelText?: React.ReactNode; cancelProps?: ButtonProps; onOk?: (ev: MouseEvent) => any | Promise<any>; onCancel?: (ev: MouseEvent) => any | Promise<any>; className?: string; style?: React.CSSProperties; }; export declare function Drawer(props: DrawerProp): import("react/jsx-runtime").JSX.Element; export declare namespace Drawer { var Close: import("react").ForwardRefExoticComponent<DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>; var Header: { ({ className, ...props }: import("react").HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element; displayName: string; }; var Title: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>; var Description: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>; var Footer: { ({ className, ...props }: import("react").HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element; displayName: string; }; }