@devvie/bottom-sheet
Version:
The 😎smart , 📦tiny , and 🎗flexible bottom sheet your app craves 🚀
34 lines (33 loc) • 1.02 kB
JavaScript
;
import { Animated, Pressable, StyleSheet } from 'react-native';
import { jsx as _jsx } from "react/jsx-runtime";
/**
* Polymorphic and re-usable animated backdrop mask component
*/
const _AnimatedTouchableBackdropMask = Animated.createAnimatedComponent(Pressable);
const AnimatedTouchableBackdropMask = ({
style,
isPressable,
pressHandler,
android_touchRippleColor,
...otherProps
}) => {
return isPressable ? /*#__PURE__*/_jsx(_AnimatedTouchableBackdropMask, {
style: [style, styles.sharedBackdropStyle],
android_ripple: android_touchRippleColor ? {
borderless: true,
color: android_touchRippleColor,
foreground: true
} : undefined,
onPress: pressHandler,
...otherProps
}) : /*#__PURE__*/_jsx(Animated.View, {
style: [style, styles.sharedBackdropStyle],
...otherProps
});
};
const styles = StyleSheet.create({
sharedBackdropStyle: StyleSheet.absoluteFillObject
});
export default AnimatedTouchableBackdropMask;
//# sourceMappingURL=index.js.map