Skip to content

Commit d46ada8

Browse files
authored
Merge pull request #254 from maslianok/v11
V11
2 parents 5cbce08 + f273b82 commit d46ada8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+6533
-14678
lines changed

.eslintignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
**/node_modules
2-
**/build
2+
**/build
3+
**/playground
4+
eslint.config.js

.npmignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
node_modules
44
src
55
test
6-
examples
6+
playground
77
yarn.lock
88
tsconfig.json
99
.babelrc

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Handle element resizes like it's 2024!
22

3-
<img src="https://img.shields.io/npm/dm/react-resize-detector?style=flat-square"> <img src="https://badgen.net/bundlephobia/minzip/react-resize-detector?style=flat-square"> <img src="https://badgen.net/bundlephobia/tree-shaking/react-resize-detector?style=flat-square">
3+
<img src="https://img.shields.io/npm/v/react-resize-detector?style=flat-square" /> <img src="https://img.shields.io/npm/l/react-resize-detector?style=flat-square" /> <img src="https://img.shields.io/npm/dm/react-resize-detector?style=flat-square" /> <img src="https://img.shields.io/bundlejs/size/react-resize-detector?style=flat-square" />
44

55
#### [Live demo](http://maslianok.github.io/react-resize-detector/)
66

@@ -10,11 +10,11 @@ Modern browsers now have native support for detecting element size changes throu
1010

1111
🐼 Written in TypeScript
1212

13-
🐠 Used by <a href="https://github.com/maslianok/react-resize-detector/network/dependents" target="__blank">160k repositories</a>
13+
🐠 Used by <a href="https://github.com/maslianok/react-resize-detector/network/dependents" target="__blank">170k repositories</a>
1414

1515
🦄 Produces <a href="https://npmtrends.com/react-resize-detector" target="__blank">100 million downloads annually</a>
1616

17-
No `window.resize` listeners! No timeouts!
17+
No `window.resize` listeners! No timeouts!
1818

1919
## Is it necessary for you to use this library?
2020

@@ -109,7 +109,7 @@ const CustomComponent = () => {
109109

110110
| Prop | Type | Description | Default |
111111
| --------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
112-
| onResize | Func | Function that will be invoked with `width` and `height` arguments | `undefined` |
112+
| onResize | Func | Function that will be invoked with `width`, `height` and ResizeObserver `entry` arguments | `undefined` |
113113
| handleWidth | Bool | Trigger `onResize` on width change | `true` |
114114
| handleHeight | Bool | Trigger `onResize` on height change | `true` |
115115
| skipOnMount | Bool | Do not trigger onResize when a component mounts | `false` |

examples/package.json

-47
This file was deleted.

0 commit comments

Comments
 (0)