File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change 11import { useEffect , useRef } from "react" ;
22import styles from "./SlidingTextBox.module.css" ;
33
4- export const initialize = ( containerBox : HTMLElement ) => {
4+ const initialize = ( containerBox : HTMLElement ) => {
55 const resizeObserver = new ResizeObserver ( ( _ ) => {
66 containerBox . style . minHeight = contentBox ?. scrollHeight + "px" ;
77 } ) ;
@@ -17,11 +17,6 @@ export const initialize = (containerBox: HTMLElement) => {
1717 } ;
1818} ;
1919
20- export const updateHeight = ( containerBox : HTMLElement ) => {
21- const contentBox = containerBox . querySelector < HTMLElement > ( "." + styles . contentBox ) ;
22- containerBox . style . minHeight = contentBox ?. scrollHeight + "px" ;
23- } ;
24-
2520export const SlidingTextBox = ( { text } : { text : string } ) => {
2621 const containerBoxRef = useRef < HTMLDivElement > ( null ) ;
2722 const initialRendering = useRef ( true ) ;
You can’t perform that action at this time.
0 commit comments