Package Exports
- rc-drawer
- rc-drawer/assets/index.css
- rc-drawer/dist/rc-drawer.css
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rc-drawer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rc-drawer
Example
http://react-component.github.io/drawer/examples/
Usage
import Drawer from 'rc-drawer';
import React from 'react';
import ReactDom from 'react-dom';
ReactDom.render(
<Drawer>
{menu children}
</Drawer>
, mountNode);
Install
Browser Support
![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|
IE 10+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
API
props | type | default | description |
---|---|---|---|
className | string | null | - |
prefixCls | string | 'drawer' | prefix class |
wrapperClassName | string | null | wrapper class name |
open | boolean | false | open or close menu |
defaultOpen | boolean | false | default open menu |
handleChild | boolean / ReactElement | true | true or false or ReactElement |
handleStyle | object | null | handle style |
placement | string | left |
left top right bottom |
level | string or array | all |
With the drawer level element. all / null / className / id / tagName / array |
levelTransition | string | transform .3s cubic-bezier(0.78, 0.14, 0.15, 0.86) |
level css transition |
getContainer | string or func or HTMLElement | body |
Return the mount node for Drawer. if is null use React.creactElement |
showMask | boolean | true | mask is show |
maskStyle | object | null | mask style |
onChange | func | null | change callback(open) |
onMaskClick | func | null | mask close click function |
onHandleClick | func | nul | handle icon click function |
1.0 remove
openClassName
width
, updateiconChild
->handleChild
onIconClick
->onHandleClick
parent
->getContainer
, addhandleStyle
showMask
.
Development
npm install
npm start