UNPKG

@gorhom/bottom-sheet

Version:

A performant interactive bottom sheet with fully configurable options 🚀

25 lines (22 loc) • 901 B
import React, { memo, useMemo } from 'react'; import { StyleSheet } from 'react-native'; import Animated from 'react-native-reanimated'; import { styles } from './styles'; const BottomSheetHandleComponent = ({ style, indicatorStyle: _indicatorStyle, children }) => { // styles const containerStyle = useMemo(() => StyleSheet.flatten([styles.container, style]), [style]); const indicatorStyle = useMemo(() => StyleSheet.flatten([styles.indicator, _indicatorStyle]), [_indicatorStyle]); // render return /*#__PURE__*/React.createElement(Animated.View, { style: containerStyle }, /*#__PURE__*/React.createElement(Animated.View, { style: indicatorStyle }), children); }; const BottomSheetHandle = /*#__PURE__*/memo(BottomSheetHandleComponent); BottomSheetHandle.displayName = 'BottomSheetHandle'; export default BottomSheetHandle; //# sourceMappingURL=BottomSheetHandle.js.map