File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ export type FitterProps = {
2828 */
2929 updateOnSizeChange ?: boolean ;
3030 /**
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.
3535 */
36- resizeDebounceTime ?: number ;
36+ resizeDebounceMs ?: number ;
3737} ;
3838
3939/**
@@ -47,7 +47,7 @@ export const Fitter = ({
4747 maxLines = 1 ,
4848 settlePrecision = 0.01 ,
4949 updateOnSizeChange = true ,
50- resizeDebounceTime = 100 ,
50+ resizeDebounceMs = 50 ,
5151} : FitterProps ) => {
5252 const wrapperRef = useRef < HTMLDivElement > ( null ) ;
5353 const textRef = useRef < HTMLSpanElement > ( null ) ;
@@ -92,7 +92,7 @@ export const Fitter = ({
9292 const start = useDebounce ( ( ) => {
9393 setTargetMax ( 1 ) ;
9494 setSettled ( false ) ;
95- } , resizeDebounceTime ) ;
95+ } , resizeDebounceMs ) ;
9696
9797 useResizeObserver ( wrapperRef , ( ) => start ( ) , updateOnSizeChange ) ;
9898
You can’t perform that action at this time.
0 commit comments