fix: fix size of drawer content wrapper div

This commit is contained in:
p-sw 2024-06-03 16:28:39 +09:00
parent dbea2ce701
commit b96c5883fb

View File

@ -319,13 +319,15 @@ const DrawerContent = forwardRef<HTMLDivElement, DrawerContentProps>(
? { ? {
height: height:
(internalRef.current?.getBoundingClientRect?.()?.height ?? (internalRef.current?.getBoundingClientRect?.()?.height ??
0) + dragState.delta, 0) +
(position === "top" ? dragState.delta : -dragState.delta),
padding: 0, padding: 0,
} }
: { : {
width: width:
(internalRef.current?.getBoundingClientRect?.()?.width ?? (internalRef.current?.getBoundingClientRect?.()?.width ??
0) + dragState.delta, 0) +
(position === "left" ? dragState.delta : -dragState.delta),
padding: 0, padding: 0,
} }
: { width: 0, height: 0, padding: 0 } : { width: 0, height: 0, padding: 0 }