@@ -218,21 +218,15 @@ const BottomSheetProvider = ({
218218} ;
219219
220220// Root 컴포넌트 (오버레이 + 시트 컨테이너)
221- const BottomSheetRoot = ( { children, animateHeight } : { children : React . ReactNode ; animateHeight : boolean } ) => {
221+ const BottomSheetRoot = ( { children } : { children : React . ReactNode } ) => {
222222 const { isOpen, closeSheet, springHeight, snapPoints, heightMode, contentHeight, autoSpringHeight } =
223223 useBottomSheetContext ( ) ;
224224
225225 const isAutoHeight = heightMode === 'auto' ;
226226 const isMeasured = contentHeight > 0 ;
227227
228- // auto 모드: 측정 전에는 'auto', 측정 후에는 설정에 따라 즉시 또는 스프링으로 높이 반영
229- const resolvedHeight = isAutoHeight
230- ? isMeasured
231- ? animateHeight
232- ? autoSpringHeight
233- : contentHeight
234- : 'auto'
235- : springHeight ;
228+ // auto 모드: 측정 전에는 'auto', 측정 후에는 스프링 애니메이션 적용
229+ const resolvedHeight = isAutoHeight ? ( isMeasured ? autoSpringHeight : 'auto' ) : springHeight ;
236230
237231 return (
238232 < AnimatePresence >
@@ -260,13 +254,9 @@ const BottomSheetRoot = ({ children, animateHeight }: { children: React.ReactNod
260254 overflow : 'hidden' ,
261255 paddingBottom : 'env(safe-area-inset-bottom)' ,
262256 } }
263- initial = { animateHeight ? { height : 0 } : false }
264- animate = {
265- animateHeight
266- ? { height : isAutoHeight ? ( isMeasured ? contentHeight : 'auto' ) : snapPoints . half }
267- : undefined
268- }
269- exit = { animateHeight ? { height : 0 } : undefined }
257+ initial = { { height : 0 } }
258+ animate = { { height : isAutoHeight ? ( isMeasured ? contentHeight : 'auto' ) : snapPoints . half } }
259+ exit = { { height : 0 } }
270260 className = { `fixed bottom-0 left-1/2 -translate-x-1/2 bg-bg-elevated max-w-md w-full rounded-t-lg ${ Z_INDEX . SHEET } ` }
271261 >
272262 < AutoHeightContent > { children } </ AutoHeightContent >
@@ -369,20 +359,17 @@ export const BottomSheet = ({
369359 showSheet,
370360 closeSheet,
371361 height,
372- animateHeight = true ,
373362} : {
374363 children : React . ReactNode ;
375364 isOpen : boolean ;
376365 showSheet : ( ) => void ;
377366 closeSheet : ( ) => void ;
378367 /** 높이 설정: 'auto' | '{x}px' | '{x}%' (기본값: '55%') */
379368 height ?: BottomSheetHeight ;
380- /** 열림 및 콘텐츠 높이 변경 시 높이 애니메이션 적용 여부 */
381- animateHeight ?: boolean ;
382369} ) => {
383370 return (
384371 < BottomSheetProvider isOpen = { isOpen } showSheet = { showSheet } closeSheet = { closeSheet } heightMode = { height } >
385- < BottomSheetRoot animateHeight = { animateHeight } > { children } </ BottomSheetRoot >
372+ < BottomSheetRoot > { children } </ BottomSheetRoot >
386373 </ BottomSheetProvider >
387374 ) ;
388375} ;
0 commit comments