Skip to content

Commit

Permalink
docs(readme): add important statement (#777)
Browse files Browse the repository at this point in the history
make it clear how to import the Resizable component.
  • Loading branch information
moklick authored Oct 19, 2022
1 parent 0e9055c commit da458ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ $ npm install --save re-resizable
### Example with `defaultSize`

```javascript
import { Resizable } from 're-resizable';

<Resizable
defaultSize={{
width:320,
height:200,
width: 320,
height: 200,
}}
>
Sample with default size
Expand All @@ -73,6 +75,8 @@ $ npm install --save re-resizable
If you use `size` props, please manage state by yourself.

```javascript
import { Resizable } from 're-resizable';

<Resizable
size={{ width: this.state.width, height: this.state.height }}
onResizeStop={(e, direction, ref, d) => {
Expand Down

0 comments on commit da458ab

Please sign in to comment.