0.4.11 • Published 6 years ago

rmc-drawer v0.4.11

Weekly downloads
23,211
License
MIT
Repository
github
Last release
6 years ago

rmc-drawer


React Drawer Component

NPM version build status Test coverage gemnasium deps npm download

Screenshots

Development

npm install
npm start

Example

http://localhost:8099/examples/

online example: http://react-component.github.io/m-drawer/

install

rmc-drawer

Usage

var Drawer = require('rmc-drawer');
var React = require('react');
React.render(<Drawer />, container);

API

props

Property nameDescriptionTypeDefault
classNameadditional css class of root dom nodeString''
prefixClsprefix classString'rmc-drawer'
childrenThe main contentanyn/a
stylecontainer styles.Object
sidebarStyleInline styles.Object{}
contentStyleInline styles.Object{}
overlayStyleInline styles.Object{}
dragHandleStyleInline styles.Object{}
sidebarThe sidebar contentanyn/a
onOpenChangeCallback called when the sidebar wants to change the open prop. Happens after sliding the sidebar and when the overlay is clicked when the sidebar is open.Functionn/a
openIf the sidebar should be openBooleanfalse
positionwhere to place the sidebarString'left', enum{'left', 'right', 'top', 'bottom'}
dockedIf the sidebar should be docked in documentBooleanfalse
transitionsIf transitions should be enabledBooleantrue
touchIf touch gestures should be enabledBooleantrue
enableDragHandleIf dragHandle should be enabledBooleantrue
dragToggleDistanceDistance the sidebar has to be dragged before it will open/close after it is released.Number30

change from https://github.com/balloob/react-sidebar

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rmc-drawer is released under the MIT license.