react-mouse-resize
Controlled component allowing to resize the content by mouse dragging
Install
This library has a peer dependency on react
and react-dom
16.8.x since it is using a react hooks. And styled-components
. So please be sure to have it installed.
npm install --save styled-components react-mouse-resizeyarn add styled-components react-mouse-resize
Usage
;
Component properties
property | description |
---|---|
onResized(size: Size) |
callback that is triggered once the component resizes |
size |
object defining the current size of the component |
mode |
union type defining the resize modenone resize handlers are not availablewidth only width handler is availableheight only height resize handler is availableboth width and height resize handlers are available |
License
MIT © koprivajakub