33 lines
1.3 KiB
React
33 lines
1.3 KiB
React
// Metro module 5372 (f5373).
|
|
import { useMemo, memo } from "react";
|
|
import { Platform } from "react-native";
|
|
import Module1606, { useAnimatedStyle } from "./Module1606";
|
|
import { useBottomSheetInternal } from "./Module5250";
|
|
import { styles } from "./Module5373";
|
|
const __initData = {
|
|
code: "function pnpm_BottomSheetBodyTsx1(){const{Platform,animatedIndex,animatedPosition}=this.__closure;return{opacity:Platform.OS==='android'&&animatedIndex.get()===-1?0:1,transform:[{translateY:animatedPosition.get()}]};}"
|
|
};
|
|
const r26 = memo(function BottomSheetBodyComponent({ style, children, BodyComponent = Module1606.View }) {
|
|
let animatedStyle;
|
|
animatedStyle = void 0;
|
|
const bottomSheetInternal = useBottomSheetInternal();
|
|
const { animatedIndex, animatedPosition } = bottomSheetInternal;
|
|
const y = () => ({
|
|
opacity: animatedIndex.get() === -1 ? 0 : 1,
|
|
transform: [{
|
|
translateY: animatedPosition.get()
|
|
}]
|
|
});
|
|
y.__closure = {
|
|
Platform,
|
|
animatedIndex,
|
|
animatedPosition
|
|
};
|
|
y.__workletHash = 5915282482182;
|
|
y.__initData = __initData;
|
|
animatedStyle = useAnimatedStyle(y, [animatedPosition, animatedIndex]);
|
|
return <BodyComponent style={useMemo(() => [style, styles.container, animatedStyle], [style, animatedStyle])} collapsable>{children}</BodyComponent>;
|
|
});
|
|
r26.displayName = "BottomSheetBody";
|
|
export { r26 as BottomSheetBody };
|