@devvie/bottom-sheet
Version:
The 😎smart , 📦tiny , and 🎗flexible bottom sheet your app craves 🚀
38 lines (37 loc) • 1.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
var _jsxRuntime = require("react/jsx-runtime");
/**
* Polymorphic and re-usable animated backdrop mask component
*/
const _AnimatedTouchableBackdropMask = _reactNative.Animated.createAnimatedComponent(_reactNative.Pressable);
const AnimatedTouchableBackdropMask = ({
style,
isPressable,
pressHandler,
android_touchRippleColor,
...otherProps
}) => {
return isPressable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedTouchableBackdropMask, {
style: [style, styles.sharedBackdropStyle],
android_ripple: android_touchRippleColor ? {
borderless: true,
color: android_touchRippleColor,
foreground: true
} : undefined,
onPress: pressHandler,
...otherProps
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
style: [style, styles.sharedBackdropStyle],
...otherProps
});
};
const styles = _reactNative.StyleSheet.create({
sharedBackdropStyle: _reactNative.StyleSheet.absoluteFillObject
});
var _default = exports.default = AnimatedTouchableBackdropMask;
//# sourceMappingURL=index.js.map