@ehfuse/taskbox 0.5.61 → 0.5.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 요소의 실제 폭(px)을 관찰하는 훅이다 — 미디어쿼리로는 알 수 없는 "이 자리에서 몇 px 인가"를 잰다
|
|
3
|
+
* (캘린더 칩처럼 격자 컬럼 폭에 따라 내용을 줄여야 하는 곳에서 쓴다).
|
|
4
|
+
* 칩이 한 화면에 수십 개라 인스턴스마다 ResizeObserver 를 만들지 않고 모듈 하나를 공유한다.
|
|
5
|
+
*/
|
|
6
|
+
/** 요소에 붙일 ref 콜백과 그 요소의 현재 폭(px)을 돌려준다(측정 전에는 0). */
|
|
7
|
+
export declare function useElementWidth(): {
|
|
8
|
+
ref: (node: HTMLElement | null) => void;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
package/package.json
CHANGED