Skip to content

Commit

Permalink
Merge pull request #254 from maslianok/v11
Browse files Browse the repository at this point in the history
V11
  • Loading branch information
maslianok authored May 28, 2024
2 parents 5cbce08 + f273b82 commit d46ada8
Show file tree
Hide file tree
Showing 42 changed files with 6,533 additions and 14,678 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
**/node_modules
**/build
**/build
**/playground
eslint.config.js
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
node_modules
src
test
examples
playground
yarn.lock
tsconfig.json
.babelrc
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Handle element resizes like it's 2024!

<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">
<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" />

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

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

🐼 Written in TypeScript

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

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

No `window.resize` listeners! No timeouts!
No `window.resize` listeners! No timeouts!

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

Expand Down Expand Up @@ -109,7 +109,7 @@ const CustomComponent = () => {

| Prop | Type | Description | Default |
| --------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| onResize | Func | Function that will be invoked with `width` and `height` arguments | `undefined` |
| onResize | Func | Function that will be invoked with `width`, `height` and ResizeObserver `entry` arguments | `undefined` |
| handleWidth | Bool | Trigger `onResize` on width change | `true` |
| handleHeight | Bool | Trigger `onResize` on height change | `true` |
| skipOnMount | Bool | Do not trigger onResize when a component mounts | `false` |
Expand Down
47 changes: 0 additions & 47 deletions examples/package.json

This file was deleted.

Loading

0 comments on commit d46ada8

Please sign in to comment.