Skip to content

Commit

Permalink
docs: Add examples of using gutter (#66)
Browse files Browse the repository at this point in the history
To help people avoid getting this error by using a number:
Warning: Failed prop type: Invalid prop `gutter` of type `number` supplied to `Masonry`, expected `string`.

Also to illustrate how to have responsive gutters because this was not obvious, see:
cedricdelpoux/react-responsive-masonry#6 (comment)
  • Loading branch information
cednore committed Jan 8, 2022
1 parent 0f40b37 commit 3011de1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ class MyWrapper extends Component {

### Mansonry component

| Name | PropType | Description | Default |
| ------------ | -------- | ----------------------------- | ------- |
| columnsCount | Number | Injected by ResponsiveMasonry | 3 |
| gutter | String | Margin surrounding each item | "0" |
| Name | PropType | Description | Default |
| ------------ | -------- | ----------------------------------------------------- | ------- |
| columnsCount | Number | Injected by ResponsiveMasonry | 3 |
| gutter | String | Margin surrounding each item e.g. "10px" or "1.5rem" | "0" |

### ResponsiveMasonry component

Expand Down

0 comments on commit 3011de1

Please sign in to comment.