Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added spinnerPosition prop to allow modifying the position of the spinner. #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shashwtd
Copy link

Allowing control over spinner position.

This pull request introduces a new prop, spinnerPosition, to the NextJS TopLoader component. The spinnerPosition prop allows developers to control the position of the spinner on the screen. The supported values for this prop are:

  • top-left
  • top-right
  • bottom-left
  • bottom-right

By default, the spinner is positioned at the top-right corner ("top-right"), ensuring that existing implementations continue to work as expected unless the prop is specifically set.

Changes:

  • Added spinnerPosition prop to the TopLoader component.
  • Updated the default configuration and documentation to reflect the new prop.

Reason for Change:

In one of my projects, I wanted to place the loader bar at the top and the spinner in the bottom-right corner. However, this wasn’t easily possible with the current setup without using a custom template. To solve this, I decided to add the spinnerPosition feature to make it easier for others who might need the same flexibility.

@shashwtd
Copy link
Author

@gwendall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant