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.tsx): Added as prop to button component #826

Merged
merged 5 commits into from
Jun 29, 2023

Conversation

nigellima
Copy link
Collaborator

@nigellima nigellima commented Jun 26, 2023

Description

Fixes #655

As @tulup-conner commented here, I decided to create a new PR with the simplest solution based on the SidebarItem component.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change contains documentation update

Breaking changes

No breaking changes

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

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

Created 'as' prop that allows the button component to be rendered as any element or functional component

fix themesberg#655
Added code example of the `as` prop usage to the Button documentation page
@vercel
Copy link

vercel bot commented Jun 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2023 2:08pm

@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (7461173) 99.54% compared to head (51d6f85) 99.54%.

❗ Current head 51d6f85 differs from pull request most recent head 3f3874c. Consider uploading reports for the commit 3f3874c to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #826   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files         163      163           
  Lines        6621     6632   +11     
  Branches      401      404    +3     
=======================================
+ Hits         6591     6602   +11     
  Misses         30       30           
Impacted Files Coverage Δ
src/components/Button/Button.tsx 100.00% <100.00%> (ø)
src/components/Navbar/NavbarToggle.tsx 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

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

Copy link
Collaborator

@rluders rluders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nigellima looks nice. I noticed one small detail... in the documentation, for the code sample that you created, when I'm hovering the button that is using span it doesn't actually change the mouse pointer. I think that would be nice to have it.

@nigellima
Copy link
Collaborator Author

nigellima commented Jun 28, 2023

@rluders something failed in the CI Build workflow which I think is not related to my previous commit. Couldnt find a way to re-run either.

Same happened to my other PR #830

Copy link
Collaborator

@rluders rluders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @nigellima.

@rluders rluders merged commit 6384882 into themesberg:main Jun 29, 2023
@nigellima nigellima deleted the feat/button-asprop branch June 29, 2023 12:40
@tulup-conner
Copy link
Collaborator

tulup-conner commented Jul 12, 2023

This is an excellent PR.. @nigellima thank you again

@Rubens10010
Copy link

I noticed href prop is not working as intended for nextjs Link component. It should append basePath as in Navbar.Link component but it doesn't.

@rluders
Copy link
Collaborator

rluders commented Jul 18, 2023

@Rubens10010 if you don't open an issue it will be lost.

@tulup-conner
Copy link
Collaborator

@Rubens10010 Can you elaborate on what you mean by that about basePath?

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.

Button with as={Link}
4 participants