🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@brighthr/component-file-selector

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brighthr/component-file-selector

2.0.7
latest
Version published
Maintainers
0
Created

File Selector

Installation

To install, type the following into the command line at the root of your project:

npm i @brighthr/component-file-selector

To implement the FileSelector component into your project you’ll need to add the import:

import FileSelector from '@brighthr/component-file-selector';

DropZone options

Uses React DropZone - dropZoneOptions can be used to configure behavior, complete list here https://react-dropzone.js.org/#src

For example - to only allow selection of one file....

import FileSelector from '@brighthr/component-file-selector';

return () => <FileSelector dropZoneOptions={{ multiple: false }} />;
NameTypeDefaultDescription
dropZoneOptionsreact-dropzone options{}Options to pass into react-dropzone (see https://react-dropzone.js.org/)
onFilesSelected(files: File[]) => voidFucntion to handle the onchange when files are selected.
textstringSets the text to display above the button.

FAQs

Package last updated on 02 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts