um-react/src/SelectFile.tsx

26 lines
666 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Box, Stack, Text } from '@chakra-ui/react';
import { UnlockIcon } from '@chakra-ui/icons';
import { useId } from 'react';
import { PointerLabel } from './PointerLabel';
export function SelectFile() {
const id = useId();
return (
<Box borderWidth="1px" borderRadius="lg" p="6">
<Stack alignItems="center">
<UnlockIcon />
<Box>
<PointerLabel htmlFor={id}>
<Text as="span" color="teal.400">
</Text>
</PointerLabel>
<input id={id} type="file" hidden multiple />
</Box>
</Stack>
</Box>
);
}