import React from "react"; import { Platform } from "react-native"; import { Text, View } from "mazlo-ui"; import styles from "./styles"; type Props = { accept?: string; disabled?: boolean; onSelect: (file: File) => void; }; const Upload = ({ accept, disabled, onSelect }: Props) => { if (Platform.OS !== "web") return File upload not supported; // TODO return ( Drag & drop file or browse { const file = e.target.files[0]; e.target.value = null; if (file) onSelect(file); }} /> ); }; export default Upload;