When uploading files on https://wetransfer.com you see our famous progress spinner. It grows and grows as it spins around, showing the percentage in the centre.
Your goal is to recreate the spinner as a reusable web component and include start and end buttons that enable or disable the spinning.
- To simulate the upload of a file, there is a 100ms
setInterval
. - The percentage of progress when uploading is a random value.
<Spinner isActive={true} progress={45} />
Name | Type | Default | Description |
---|---|---|---|
isUploading | boolean | false |
Set when is uploading a new file. |
progress | number | 0 |
Show the progress value. |
size | number | 160 |
Set height and width for the spinner. |
stroke | number | 12 |
Set stroke of the spinner. |
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
Builds the app for production and deploy it using Github Pages to https://vinicius-sabadim.github.io/wetransfer-assignment