|
@@ -8,6 +8,7 @@ import {
|
|
|
} from "react";
|
|
} from "react";
|
|
|
import {
|
|
import {
|
|
|
type LayoutChangeEvent,
|
|
type LayoutChangeEvent,
|
|
|
|
|
+ useWindowDimensions,
|
|
|
PanResponder,
|
|
PanResponder,
|
|
|
ScrollView,
|
|
ScrollView,
|
|
|
Platform,
|
|
Platform,
|
|
@@ -35,8 +36,6 @@ import type {
|
|
|
IModalRef
|
|
IModalRef
|
|
|
} from "../modal/type";
|
|
} from "../modal/type";
|
|
|
import {
|
|
import {
|
|
|
- windowHeight,
|
|
|
|
|
- windowWidth,
|
|
|
|
|
webStyle,
|
|
webStyle,
|
|
|
uuid
|
|
uuid
|
|
|
} from "../../utils";
|
|
} from "../../utils";
|
|
@@ -102,6 +101,11 @@ const BottomSheet: RefForwardingComponent<IBottomSheetRef, IBottomSheetProps> =
|
|
|
setIsActive
|
|
setIsActive
|
|
|
] = useState(isActiveProp === undefined ? false : isActiveProp);
|
|
] = useState(isActiveProp === undefined ? false : isActiveProp);
|
|
|
|
|
|
|
|
|
|
+ const {
|
|
|
|
|
+ height: windowHeight,
|
|
|
|
|
+ width: windowWidth
|
|
|
|
|
+ } = useWindowDimensions();
|
|
|
|
|
+
|
|
|
const id = useRef(outID ? outID : uuid());
|
|
const id = useRef(outID ? outID : uuid());
|
|
|
|
|
|
|
|
const bottomSheetKey = useRef(customKey ? customKey : uuid());
|
|
const bottomSheetKey = useRef(customKey ? customKey : uuid());
|
|
@@ -1067,7 +1071,7 @@ const BottomSheet: RefForwardingComponent<IBottomSheetRef, IBottomSheetProps> =
|
|
|
scrollViewStyle,
|
|
scrollViewStyle,
|
|
|
webStyle({
|
|
webStyle({
|
|
|
maxWidth: windowWidth > 500 ? 500 : undefined,
|
|
maxWidth: windowWidth > 500 ? 500 : undefined,
|
|
|
- width: windowWidth > 500 ? 500 : undefined,
|
|
|
|
|
|
|
+ width: windowWidth > 500 ? 500 : "100%",
|
|
|
alignSelf: "center"
|
|
alignSelf: "center"
|
|
|
})
|
|
})
|
|
|
]}
|
|
]}
|
|
@@ -1101,7 +1105,7 @@ const BottomSheet: RefForwardingComponent<IBottomSheetRef, IBottomSheetProps> =
|
|
|
style={[
|
|
style={[
|
|
|
webStyle({
|
|
webStyle({
|
|
|
maxWidth: windowWidth > 500 ? 500 : undefined,
|
|
maxWidth: windowWidth > 500 ? 500 : undefined,
|
|
|
- width: windowWidth > 500 ? 500 : undefined,
|
|
|
|
|
|
|
+ width: windowWidth > 500 ? 500 : "100%",
|
|
|
alignSelf: "center"
|
|
alignSelf: "center"
|
|
|
})
|
|
})
|
|
|
]}
|
|
]}
|
|
@@ -1123,7 +1127,7 @@ const BottomSheet: RefForwardingComponent<IBottomSheetRef, IBottomSheetProps> =
|
|
|
style={[
|
|
style={[
|
|
|
webStyle({
|
|
webStyle({
|
|
|
maxWidth: windowWidth > 500 ? 500 : undefined,
|
|
maxWidth: windowWidth > 500 ? 500 : undefined,
|
|
|
- width: windowWidth > 500 ? 500 : undefined,
|
|
|
|
|
|
|
+ width: windowWidth > 500 ? 500 : "100%",
|
|
|
alignSelf: "center"
|
|
alignSelf: "center"
|
|
|
})
|
|
})
|
|
|
]}
|
|
]}
|
|
@@ -1175,6 +1179,7 @@ const BottomSheet: RefForwardingComponent<IBottomSheetRef, IBottomSheetProps> =
|
|
|
? colors.content.container[handleBackgroundColor]
|
|
? colors.content.container[handleBackgroundColor]
|
|
|
: colors.content.container.default,
|
|
: colors.content.container.default,
|
|
|
borderRadius: handleBorderRadius,
|
|
borderRadius: handleBorderRadius,
|
|
|
|
|
+ width: windowWidth / 10,
|
|
|
height: handleHeight
|
|
height: handleHeight
|
|
|
}
|
|
}
|
|
|
]}
|
|
]}
|