mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(component): helper function observeResize to observe size change via global ResizeObserver (#7241)
```ts
import { observeResize } from "@affine/component";
useEffect(() => {
const dispose = observeResize(element entry => {
console.log(entry.contentRect);
});
return () => dispose();
}, []);
```
This commit is contained in:
@@ -24,3 +24,4 @@ export * from './ui/switch';
|
||||
export * from './ui/table';
|
||||
export * from './ui/toast';
|
||||
export * from './ui/tooltip';
|
||||
export * from './utils';
|
||||
|
||||
Reference in New Issue
Block a user