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

feat(button): added forwardRef to button component #391

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

myabeaver
Copy link
Contributor

Added forwardRef to button component to work with Next.js' Link component.

fix #341

Description

This PR adds forwardRef to Flowbite's Button component to ensure, that it works nicely with the Link component from Next.js.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Added forwardRef to button component to work with Next.js' Link component.

fix themesberg#341
@codecov
Copy link

codecov bot commented Oct 16, 2022

Codecov Report

Base: 98.62% // Head: 98.62% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (dde0978) compared to base (37644b7).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #391   +/-   ##
=======================================
  Coverage   98.62%   98.62%           
=======================================
  Files          89       89           
  Lines        4141     4147    +6     
  Branches      380      380           
=======================================
+ Hits         4084     4090    +6     
  Misses         57       57           
Impacted Files Coverage Δ
src/lib/components/Button/index.tsx 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@myabeaver
Copy link
Contributor Author

If you would like me to make some changes, i'm glad to do that.

@rluders
Copy link
Collaborator

rluders commented Oct 17, 2022

@myasteiner didn't had the time to test it yet. But I'll check it ASAP.

@myabeaver
Copy link
Contributor Author

myabeaver commented Oct 18, 2022

@rluders I forgot to ask, should it be done for other components like Breadcrumb too? Because it would make sense in our case or better in another PR?

@rluders
Copy link
Collaborator

rluders commented Oct 18, 2022

@myasteiner probably better to address the breadcrumb on a separate PR.

@rluders rluders merged commit 3278c84 into themesberg:main Oct 19, 2022
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.

forwardRef for button component
2 participants