|
4 | 4 | [![NPM version][npm-image]][npm-url]
|
5 | 5 | [![build status][travis-image]][travis-url]
|
6 | 6 | [![Test coverage][coveralls-image]][coveralls-url]
|
7 |
| -[![gemnasium deps][gemnasium-image]][gemnasium-url] |
8 | 7 | [![node version][node-image]][node-url]
|
9 | 8 | [![npm download][download-image]][download-url]
|
10 | 9 |
|
|
14 | 13 | [travis-url]: https://travis-ci.org/react-component/drawer-menu
|
15 | 14 | [coveralls-image]: https://img.shields.io/coveralls/react-component/drawer-menu.svg?style=flat-square
|
16 | 15 | [coveralls-url]: https://coveralls.io/r/react-component/drawer-menu?branch=master
|
17 |
| -[gemnasium-image]: http://img.shields.io/gemnasium/react-component/drawer-menu.svg?style=flat-square |
18 |
| -[gemnasium-url]: https://gemnasium.com/react-component/drawer-menu |
19 | 16 | [node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
|
20 | 17 | [node-url]: http://nodejs.org/download/
|
21 | 18 | [download-image]: https://img.shields.io/npm/dm/rc-drawer-menu.svg?style=flat-square
|
@@ -53,22 +50,23 @@ ReactDom.render(
|
53 | 50 |
|
54 | 51 | | props | type | default | description |
|
55 | 52 | |------------|----------------|---------|----------------|
|
56 |
| -| className | string | `drawer` | - | |
57 |
| -| openClassName | string | `drawer-open` | open className | |
| 53 | +| className | string | null | - | |
| 54 | +| prefixCls | string | 'drawer' | prefix class | |
58 | 55 | | wrapperClassName | string | null | wrapper class name |
|
59 |
| -| iconChild | boolean / ReactElement / Array | true | true or false or ReactElement or Array(ReactElement, ReactElement) => [ close, open ] | |
60 | 56 | | open | boolean | false | open or close menu |
|
61 | 57 | | defaultOpen | boolean | false | default open menu |
|
62 |
| -| width | string | `60vw` | children width | |
63 |
| -| placement | string | `left` | `left` or `right` | |
| 58 | +| handleChild | boolean / ReactElement | true | true or false or ReactElement | |
| 59 | +| handleStyle | object | null | handle style | |
| 60 | +| placement | string | `left` | `left` `top` `right` `bottom` | |
64 | 61 | | level | string or array | `all` | With the drawer level element. `all`/ null / className / id / tagName / array |
|
65 | 62 | | levelTransition | string | `transform .3s cubic-bezier(0.78, 0.14, 0.15, 0.86)` | level css transition |
|
66 |
| -| parent | string | `body` | parent element. if is `null` use React.creactElement | |
| 63 | +| getContainer | string | `body` | Return the mount node for Drawer. if is `null` use React.creactElement | |
| 64 | +| showMask | boolean | true | mask is show | |
67 | 65 | | onChange | func | null | change callback(open) |
|
68 | 66 | | onMaskClick | func | null | mask close click function |
|
69 |
| -| onIconClick | func | nul | icon click function | |
| 67 | +| onHandleClick | func | nul | handle icon click function | |
70 | 68 |
|
71 |
| -> 0.5 onSwitch split into `onMaskClick` `onIconClick`; |
| 69 | +> 1.0 remove `openClassName` `width`, update `iconChild` -> `handleChild` `onIconClick` -> `onHandleClick`, add `handleStyle` `showMask`. |
72 | 70 |
|
73 | 71 | ## Development
|
74 | 72 |
|
|
0 commit comments