Dropzone
Capture files from user with drag and drop
- Import
import { Dropzone } from '@smile/haring-react-dropzone';
- Extends Dropzone
- Source View Source Code
- Package @smile/haring-react-dropzone
- Storybook Storybook
Storybook Docs
Props
Name | Type | Default | Description |
---|---|---|---|
browseLabel | string | "Browse your device" | String displayed at the bottom next to the Eye icon |
children | ReactElement | - | Element inserted at the bottom of the container |
dragLabel | string | "Drag and drop your documents here" | String displayed in the center of the container |
files | IFile[] | [] | Controlled value of the current files |
buttonPlusTitle | string | "Add button" | Tooltip title of top + button |
onDrop | (files: FileWithPath[]) => void See FileWithPath | - | Called when valid files are dropped into dropzone |
onRemoveFile | (file: IFile) => void | - | Called when added file is removed by clicking on x button |
... | - | - | extends Dropzone props |
IFile
Attribute | Type | Description |
---|---|---|
id | number | string | Nested array of menus |
... | - | Extends FileWithPath |