- About the Project
- Getting Started
- Component configuration
- Contributing
- License
- Contact
- Acknowledgements
The project is part of a collection of small components built with React, made to be flexible and ready to be imported on CSR and SSR. This component was made to provide the functionality of the back-to-top button used on many applications.
- React
- Storybook
- Jest
- @testing-library
To get a local copy up and running follow these simple steps.
- node
You can follow the installation guide from the official documentation here
- yarn
You can follow the installation guide from the official documentation here
- Clone the repo
git clone https://github.com/samuelsilvadev/back-to-top.git
- Install NPM packages
yarn
Props | Default value | Description |
---|---|---|
showAfterRef | undefined | React.Ref that will be used to detect when the back to top should appear. |
alwaysVisible | true | Defines if the element will always be visible. It should be false when the showAfterRef is provided |
onClick | undefined | Called whenever a click happens on the button |
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/something-amazing
) - Commit your Changes (
git commit -m 'feat: Add something amazing'
) - Push to the Branch (
git push origin feature/something-amazing
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.