A react component that allows users to drag and drop image files to resize and crop the image.
A project developed using best practices to make the code readable and reusable.
Developed using the following tech stack:
- React
- Typescript
- Styled-components
- React Testing Library
- Husky and lint-staged for better development experience
Test it live here (hosted on Netlify)
-
Make sure you have Node, a package manager (Yarn or NPM) and GIT installed locally
-
Clone this repository on some folder
git clone https://github.com/Henriquepb22/avatar-drag-and-drop.git
# or via SSH
git clone [email protected]:Henriquepb22/avatar-drag-and-drop.git
- Install dependencies
# go inside project folder
cd avatar-drag-and-drop/
# and run the following command
npm install
# or with yarn
yarn
- Now after dependencies installing run the project
npm run start
# or with yarn
yarn start
-
Now a browser should open on localhost:3000 with the project running!
-
To run the tests run the following command
# run tests once
npm run test
# with yarn
yarn test
# run tests in watch mode with coverage
npm run test:watch
# or with yarn
yarn test:watch