UNPKG

1.19 kBTypeScriptView Raw
1import * as React from 'react';
2import { StandardProps } from '..';
3import { ModalProps } from '../Modal';
4import { SlideProps } from '../Slide';
5import { PaperProps } from '../Paper';
6import { Theme } from '../styles/createMuiTheme';
7import { TransitionHandlerProps, TransitionProps } from '../transitions/transition';
8
9export interface DrawerProps
10 extends StandardProps<
11 ModalProps & Partial<TransitionHandlerProps>,
12 DrawerClassKey,
13 'open' | 'children'
14 > {
15 anchor?: 'left' | 'top' | 'right' | 'bottom';
16 children?: React.ReactNode;
17 elevation?: number;
18 ModalProps?: Partial<ModalProps>;
19 open?: boolean;
20 PaperProps?: Partial<PaperProps>;
21 SlideProps?: Partial<SlideProps>;
22 theme?: Theme;
23 transitionDuration?: TransitionProps['timeout'];
24 variant?: 'permanent' | 'persistent' | 'temporary';
25}
26
27export type DrawerClassKey =
28 | 'root'
29 | 'docked'
30 | 'paper'
31 | 'paperAnchorLeft'
32 | 'paperAnchorRight'
33 | 'paperAnchorTop'
34 | 'paperAnchorBottom'
35 | 'paperAnchorDockedLeft'
36 | 'paperAnchorDockedTop'
37 | 'paperAnchorDockedRight'
38 | 'paperAnchorDockedBottom'
39 | 'modal';
40
41declare const Drawer: React.ComponentType<DrawerProps>;
42
43export default Drawer;