about summary refs log tree commit diff
path: root/src/view/com/modals/WebModal.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/modals/WebModal.tsx')
-rw-r--r--src/view/com/modals/WebModal.tsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/view/com/modals/WebModal.tsx b/src/view/com/modals/WebModal.tsx
new file mode 100644
index 000000000..fed2fae91
--- /dev/null
+++ b/src/view/com/modals/WebModal.tsx
@@ -0,0 +1,20 @@
+/**
+ * Use this for the Web build only.
+ * It's intended to replace the BottomSheet.
+ *
+ * Note: the dataSet properties are used to leverage custom CSS in public/index.html
+ */
+import React from 'react'
+// @ts-ignore no declarations available -prf
+import {TouchableWithoutFeedback, View} from 'react-native-web'
+
+type Props = {onClose: () => void}
+export const Modal: React.FC<Props> = ({onClose, children}) => {
+  return (
+    <TouchableWithoutFeedback onPress={onClose}>
+      <View dataSet={{'modal-overlay': 1}}>
+        <View dataSet={{'modal-container': 1}}>{children}</View>
+      </View>
+    </TouchableWithoutFeedback>
+  )
+}