mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
1/**
2 * Use this for the Web build only.
3 * It's intended to replace the BottomSheet.
4 *
5 * Note: the dataSet properties are used to leverage custom CSS in public/index.html
6 */
7import React from 'react'
8// @ts-ignore no declarations available -prf
9import {TouchableWithoutFeedback, View} from 'react-native-web'
10
11type Props = {onClose: () => void}
12export const Modal: React.FC<Props> = ({onClose, children}) => {
13 return (
14 <TouchableWithoutFeedback onPress={onClose}>
15 <View dataSet={{'modal-overlay': 1}}>
16 <View dataSet={{'modal-container': 1}}>{children}</View>
17 </View>
18 </TouchableWithoutFeedback>
19 )
20}