React Resizable Component
A React component to implement cross-browser event based resize detection, without interval polling!.
Usage
var Resizable = require('react-component-resizable');
Content...
npm install react-component-resizable --save
Prop types
static propTypes = triggersClass: PropTypesstring expandClass : PropTypesstring contractClass: PropTypesstring embedCss : PropTypesbool onResize : PropTypesfuncisRequired static defaultProps = triggersClass: 'resize-triggers' expandClass: 'expand-trigger' contractClass: 'contract-trigger' embedCss: true
Default style
The component will automatically embed some required style. This can be turned off using the embedCss={false}
prop.
Credits
Many thanks to Daniel - backalleycoder.com for this blog post and scecima and his project javascript-detect-element-resize!
Licence
MIT