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

Implement template option #32

Merged
merged 2 commits into from
Oct 16, 2023
Merged

Implement template option #32

merged 2 commits into from
Oct 16, 2023

Conversation

ProchaLu
Copy link
Contributor

Closes #30

Description

This PR enhances the library by adding a template option, improving its usability and testing capabilities. By adding this feature, developers can now easily include custom templates, such as data-test-id attributes, for better testing purposes.

  • Code without the use of the template option:
<NextTopLoader />
Screenshot 2023-07-26 at 14 03 47
  • Code with the use of the template option:
<NextTopLoader 
  template='<div class="bar" data-test-id="loading" role="bar"><div class="peg"></div></div>
  <div class="spinner" role="spinner"><div class="spinner-icon"></div></div>' />
Screenshot 2023-07-26 at 14 04 38

@TheSGJ TheSGJ merged commit e93bba6 into TheSGJ:master Oct 16, 2023
3 checks passed
@TheSGJ TheSGJ added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow passing arbitrary props to NextTopLoader component
2 participants