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

Add Support for Custom Link Components in Button #2007

Open
jadnast opened this issue Dec 21, 2024 · 0 comments
Open

Add Support for Custom Link Components in Button #2007

jadnast opened this issue Dec 21, 2024 · 0 comments

Comments

@jadnast
Copy link

jadnast commented Dec 21, 2024

Enhance the Button component to support custom link components (e.g., NextLink) using a new hrefComponent prop.

Details

  • New Prop: hrefComponent in ButtonProps.
  • If hrefComponent is provided, the specified component will be rendered for links instead of <a>.
  • Backward compatibility is ensured by defaulting to <a> when hrefComponent is not set.
  • This improvement ensures flexibility for projects using custom routing libraries like Next.js.
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

No branches or pull requests

1 participant