File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ export type FitterProps = {
28
28
*/
29
29
updateOnSizeChange ?: boolean ;
30
30
/**
31
- * The time to wait before updating the text size when the size of the
32
- * component changes. This is useful when the component is being resized
33
- * frequently and you want to avoid updating the text size on every resize
34
- * event.
31
+ * The time in milliseconds to wait before updating the text size when the
32
+ * size of the component changes. This is useful when the component is being
33
+ * resized frequently and you want to avoid updating the text size on every
34
+ * resize event.
35
35
*/
36
- resizeDebounceTime ?: number ;
36
+ resizeDebounceMs ?: number ;
37
37
} ;
38
38
39
39
/**
@@ -47,7 +47,7 @@ export const Fitter = ({
47
47
maxLines = 1 ,
48
48
settlePrecision = 0.01 ,
49
49
updateOnSizeChange = true ,
50
- resizeDebounceTime = 100 ,
50
+ resizeDebounceMs = 50 ,
51
51
} : FitterProps ) => {
52
52
const wrapperRef = useRef < HTMLDivElement > ( null ) ;
53
53
const textRef = useRef < HTMLSpanElement > ( null ) ;
@@ -92,7 +92,7 @@ export const Fitter = ({
92
92
const start = useDebounce ( ( ) => {
93
93
setTargetMax ( 1 ) ;
94
94
setSettled ( false ) ;
95
- } , resizeDebounceTime ) ;
95
+ } , resizeDebounceMs ) ;
96
96
97
97
useResizeObserver ( wrapperRef , ( ) => start ( ) , updateOnSizeChange ) ;
98
98
You can’t perform that action at this time.
0 commit comments