UNPKG

1.09 kBTypeScriptView Raw
1import * as React from "react";
2import { IModal, ModalContentProps } from "../Modal";
3import { BoxProps } from "../Box";
4import { CloseButtonProps } from "../CloseButton";
5
6interface IDrawer extends IModal {
7 /**
8 * The size of the drawer when placement is `left` or `right`.
9 */
10 size?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
11 /**
12 * If `true`, the drawer fills the height of the viewport by default.
13 */
14 isFullHeight?: boolean;
15 /**
16 * Set the position of the drawer should slide from.
17 */
18 placement?: "top" | "left" | "bottom" | "right";
19 /**
20 * The element to receive focus when the drawer closes.
21 * You could point it to the element that triggered the drawer
22 */
23 finalFocusRef?: IModal["finalFocusRef"];
24}
25
26export const Drawer: React.FC<IDrawer>;
27export const DrawerBody: React.FC<BoxProps>;
28export const DrawerHeader: React.FC<BoxProps>;
29export const DrawerContent: React.FC<ModalContentProps>;
30export const DrawerFooter: React.FC<BoxProps>;
31export const DrawerOverlay: React.FC<BoxProps>;
32export const DrawerCloseButton: React.FC<CloseButtonProps>;