UNPKG

1.25 kBTypeScriptView Raw
1import * as React from 'react';
2export declare enum DrawerColorVariant {
3 default = "default",
4 light200 = "light-200"
5}
6export interface DrawerProps extends React.HTMLProps<HTMLDivElement> {
7 /** Additional classes added to the Drawer. */
8 className?: string;
9 /** Content rendered in the left hand panel */
10 children?: React.ReactNode;
11 /** Indicates if the drawer is expanded */
12 isExpanded?: boolean;
13 /** Indicates if the content element and panel element are displayed side by side. */
14 isInline?: boolean;
15 /** Indicates if the drawer will always show both content and panel. */
16 isStatic?: boolean;
17 /** Position of the drawer panel */
18 position?: 'left' | 'right' | 'bottom';
19 /** Callback when drawer panel is expanded after waiting 250ms for animation to complete. */
20 onExpand?: () => void;
21}
22export interface DrawerContextProps {
23 isExpanded: boolean;
24 isStatic: boolean;
25 onExpand?: () => void;
26 position?: string;
27 drawerRef?: React.RefObject<HTMLDivElement>;
28 isInline: boolean;
29}
30export declare const DrawerContext: React.Context<Partial<DrawerContextProps>>;
31export declare const Drawer: React.FunctionComponent<DrawerProps>;
32//# sourceMappingURL=Drawer.d.ts.map
\No newline at end of file