dw-neit-rc-resize-observer
v1.4.0
Published
Resize observer for React
Downloads
65
Maintainers
Readme
dw-neit-rc-resize-observer
Resize observer for React.
Live Demo
https://react-component.github.io/resize-observer/
Install
Usage
import ResizeObserver from 'dw-neit-rc-resize-observer';
import { render } from 'react-dom';
render(
<ResizeObserver
onResize={() => {
console.log('resized!');
}}
>
<textarea />
</ResizeObserver>,
mountNode,
);
API
| Property | Type | Default | Description | | -------- | --------------------------- | ------- | ------------------------------- | | disabled | boolean | false | | | onResize | ({ width, height }) => void | - | Trigger when child node resized |
Development
npm install
npm start
License
rc-resize-observer is released under the MIT license.