MCPcopy Create free account
hub / github.com/dunky11/react-saas-template / Dropzone

Function Dropzone

src/shared/components/Dropzone.js:31–59  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

29}
30
31function Dropzone(props) {
32 const { onDrop, accept, fullHeight, children, classes, style, theme } = props;
33 const {
34 getRootProps,
35 getInputProps,
36 isDragAccept,
37 isDragReject
38 } = useDropzone({
39 accept: accept,
40 onDrop: onDrop
41 });
42 return (
43 <Box {...getRootProps()} height="100%">
44 <input {...getInputProps()} />
45 <ColoredButton
46 fullWidth
47 className={classNames(
48 fullHeight ? classes.fullHeight : null,
49 classes.button
50 )}
51 variant="outlined"
52 color={getColor(isDragAccept, isDragReject, theme)}
53 style={style}
54 >
55 {children}
56 </ColoredButton>
57 </Box>
58 );
59}
60
61Dropzone.propTypes = {
62 classes: PropTypes.object.isRequired,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected