@@ -35,41 +35,41 @@ ReactDom.render(
35
35
36
36
## Browser Support
37
37
38
- | ![ IE] ( https://github.com/alrra/browser-logos/blob/master/src/edge/edge_48x48.png?raw=true ) | ![ Chrome] ( https://github.com/alrra/browser-logos/blob/master/src/chrome/chrome_48x48.png?raw=true ) | ![ Firefox] ( https://github.com/alrra/browser-logos/blob/master/src/firefox/firefox_48x48.png?raw=true ) | ![ Opera] ( https://github.com/alrra/browser-logos/blob/master/src/opera/opera_48x48.png?raw=true ) | ![ Safari] ( https://github.com/alrra/browser-logos/blob/master/src/safari/safari_48x48.png?raw=true ) |
39
- | --- | --- | --- | --- | --- |
40
- | IE 10+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
38
+ | ![ IE] ( https://github.com/alrra/browser-logos/blob/master/src/edge/edge_48x48.png?raw=true ) | ![ Chrome] ( https://github.com/alrra/browser-logos/blob/master/src/chrome/chrome_48x48.png?raw=true ) | ![ Firefox] ( https://github.com/alrra/browser-logos/blob/master/src/firefox/firefox_48x48.png?raw=true ) | ![ Opera] ( https://github.com/alrra/browser-logos/blob/master/src/opera/opera_48x48.png?raw=true ) | ![ Safari] ( https://github.com/alrra/browser-logos/blob/master/src/safari/safari_48x48.png?raw=true ) |
39
+ | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- --- |
40
+ | IE 10+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
41
41
42
42
## API
43
43
44
- | props | type | default | description |
45
- | ------------| ----------------| ---------| ----------------|
46
- | className | string | null | - |
47
- | classNames | { mask?: string; content?: string; wrapper?: string; } | - | pass className to target area |
48
- | styles | { mask?: CSSProperties; content?: CSSProperties; wrapper?: CSSProperties; } | - | pass style to target area |
49
- | prefixCls | string | 'drawer' | prefix class |
50
- | width | string \| number | null | drawer content wrapper width, drawer level transition width |
51
- | height | string \| number | null | drawer content wrapper height, drawer level transition height |
52
- | open | boolean | false | open or close menu |
53
- | defaultOpen | boolean | false | default open menu |
54
- | placement | string | ` left ` | ` left ` ` top ` ` right ` ` bottom ` |
55
- | level | string \| array | ` all ` | With the drawer level element. ` all ` / null / className / id / tagName / array |
56
- | levelMove | number \| array \| func | null | level move value. default is drawer width |
57
- | duration | string | ` .3s ` | level animation duration |
58
- | ease | string | ` cubic-bezier(0.78, 0.14, 0.15, 0.86) ` | level animation timing function |
59
- | getContainer | string \| func \| HTMLElement | ` body ` | Return the mount node for Drawer. if is ` null ` use React.creactElement |
60
- | showMask | boolean | true | mask is show |
61
- | maskClosable | boolean | true | Clicking on the mask (area outside the Drawer) to close the Drawer or not. |
62
- | maskStyle | CSSProperties | null | mask style |
63
- | afterVisibleChange | func | null | transition end callback(open) |
64
- | onClose | func | null | close click function |
65
- | keyboard | boolean | true | Whether support press esc to close |
66
- | autoFocus | boolean | true | Whether focusing on the drawer after it opened |
67
- | onMouseEnter | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse enter drawer panel |
68
- | onMouseOver | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse over drawer panel |
69
- | onMouseLeave | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse leave drawer panel |
70
- | onClick | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse click drawer panel |
71
- | onKeyDown | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse keydown on drawer panel |
72
- | onKeyUp | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse keyup on drawer panel |
44
+ | props | type | default | description |
45
+ | ------------------ | --------------------------------------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------- |
46
+ | className | string | null | - |
47
+ | classNames | { mask?: string; content?: string; wrapper?: string; } | - | pass className to target area |
48
+ | styles | { mask?: CSSProperties; content?: CSSProperties; wrapper?: CSSProperties; } | - | pass style to target area |
49
+ | prefixCls | string | 'drawer' | prefix class |
50
+ | width | string \| number | null | drawer content wrapper width, drawer level transition width |
51
+ | height | string \| number | null | drawer content wrapper height, drawer level transition height |
52
+ | open | boolean | false | open or close menu |
53
+ | defaultOpen | boolean | false | default open menu |
54
+ | placement | string | ` left ` | ` left ` ` top ` ` right ` ` bottom ` |
55
+ | level | string \| array | ` all ` | With the drawer level element. ` all ` / null / className / id / tagName / array |
56
+ | levelMove | number \| array \| func | null | level move value. default is drawer width |
57
+ | duration | string | ` .3s ` | level animation duration |
58
+ | ease | string | ` cubic-bezier(0.78, 0.14, 0.15, 0.86) ` | level animation timing function |
59
+ | getContainer | string \| func \| HTMLElement | ` body ` | Return the mount node for Drawer. if is ` null ` use React.creactElement |
60
+ | showMask | boolean | true | mask is show |
61
+ | maskClosable | boolean | true | Clicking on the mask (area outside the Drawer) to close the Drawer or not. |
62
+ | maskStyle | CSSProperties | null | mask style |
63
+ | afterVisibleChange | func | null | transition end callback(open) |
64
+ | onClose | func | null | close click function |
65
+ | keyboard | boolean | true | Whether support press esc to close |
66
+ | autoFocus | boolean | true | Whether focusing on the drawer after it opened |
67
+ | onMouseEnter | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse enter drawer panel |
68
+ | onMouseOver | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse over drawer panel |
69
+ | onMouseLeave | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse leave drawer panel |
70
+ | onClick | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse click drawer panel |
71
+ | onKeyDown | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse keydown on drawer panel |
72
+ | onKeyUp | React.MouseEventHandler\< HTMLDivElement\> | - | Trigger when mouse keyup on drawer panel |
73
73
74
74
> 2.0 Rename ` onMaskClick ` -> ` onClose ` , add ` maskClosable ` .
75
75
0 commit comments