vinicius-sabadim / wetransfer-assignment

Home Page:https://vinicius-sabadim.github.io/wetransfer-assignment/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Online demo

WeTransfer - Frontend Engineer Assignment

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.

Requirements

Your goal is to recreate the spinner as a reusable web component and include start and end buttons that enable or disable the spinning.

Implementation notes

  • To simulate the upload of a file, there is a 100ms setInterval.
  • The percentage of progress when uploading is a random value.

Usage

<Spinner isActive={true} progress={45} />

API

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.

Available Scripts

In the project directory, you can run:

npm start

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.

npm test

Launches the test runner in the interactive watch mode.

npm run build

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!

npm run deploy

Builds the app for production and deploy it using Github Pages to https://vinicius-sabadim.github.io/wetransfer-assignment

About

https://vinicius-sabadim.github.io/wetransfer-assignment/


Languages

Language:TypeScript 71.2%Language:HTML 12.9%Language:CSS 12.5%Language:JavaScript 3.4%