UNPKG

@devvie/bottom-sheet

Version:

The 😎smart , 📦tiny , and 🎗flexible bottom sheet your app craves 🚀

32 lines (31 loc) • 1.14 kB
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import React from 'react'; import { forwardRef } from 'react'; import { Animated, StyleSheet } from 'react-native'; /** * This is the overall container view of the bottom sheet */ const Container = /*#__PURE__*/forwardRef((_ref, ref) => { let { style, ...otherProps } = _ref; return /*#__PURE__*/React.createElement(Animated.View, _extends({ ref: ref, style: [styles.container, style] }, otherProps)); }); const styles = StyleSheet.create({ container: { position: 'absolute', justifyContent: 'flex-end', right: 0, left: 0, // required to snap container to bottom of screen, so animation will start from botom to up bottom: 0, backgroundColor: 'transparent', opacity: 1 } }); export default Container; //# sourceMappingURL=index.js.map