File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,17 @@ It takes advantage of the `resize` event of the `<object>` HTML element.
1212
1313It requires just React.js and ReactDOM.
1414
15- Install it with
15+ Install it with:
1616
1717```
1818npm install react-resize-aware --save
1919```
2020
2121# Usage
2222
23+ > ** note** : ` ResizeAware ` needs a position different from ` initial ` to work!
24+ > Make sure to set it to ` relative ` , ` absolute ` or ` fixed ` trough ` style ` or CSS
25+
2326``` jsx
2427import React , { Component } from ' react'
2528import { findDOMNode } from ' react-dom'
@@ -28,7 +31,7 @@ import ResizeAware from 'react-resize-aware'
2831export default class FooBar extends Component {
2932 render () {
3033 return (
31- < ResizeWare ref= ' container' >
34+ < ResizeWare ref= ' container' style = {{position : ' relative ' }} >
3235 Hello, World!
3336 < / ResizeAware>
3437 )
You can’t perform that action at this time.
0 commit comments