[TButtonScroller] contentHeight 에 offsetTop 추가 적용

This commit is contained in:
jiwon93.son
2024-05-22 13:56:21 +09:00
parent 92dbd32a37
commit f78bae0de8
2 changed files with 6 additions and 3 deletions

View File

@@ -51,7 +51,10 @@ export default function TButtonScroller({
const calculateContentHeight = useCallback(() => {
if (contentRef.current) {
setContentHeight(contentRef.current?.scrollHeight);
const offsetTop = contentRef.current?.offsetTop;
const offsetHeight = contentRef.current?.offsetHeight;
setContentHeight(offsetTop + offsetHeight);
}
}, [contentRef]);

View File

@@ -76,7 +76,7 @@
padding: 60px 42px 30px 60px;
.buttonContainer {
padding: 30px 0;
margin-top: 30px;
display: flex;
justify-content: center;
> div {
@@ -102,7 +102,7 @@
.buttonContainer {
display: flex;
justify-content: center;
margin-top: 22px;
margin-top: 30px;
}
}
.textPopup,