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: add NavLink with dynamic className support #2539

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

manuelbento19
Copy link
Contributor

@manuelbento19 manuelbento19 commented Jun 21, 2024

Related Issue

This PR implements the NavLink component with support for dynamic className definition, as discussed in issue #2538 .

Description

Proposed Changes

  • Implementation of the NavLink component that extends Next.js LinkProps props.
  • Added support for dynamic className, which can be a static string or a function that returns a CSS class string.
  • Using usePathname (or equivalent functionality) to determine whether the link is active by applying the appropriate CSS class based on the current URL.

Checklist

  • Implementation of NavLink component.

Screenshots

image

@github-actions github-actions bot added the wait for reviewers wait for the maintainer label Jun 21, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Great job, @manuelbento19! 🎉 Thank you for submitting your first pull request. Your contribution is valuable and we appreciate your efforts to improve our project.

We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines

Copy link
Owner

@priyankarpal priyankarpal left a comment

Choose a reason for hiding this comment

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

working fine 🚀 🥳

@priyankarpal priyankarpal merged commit 25021ac into priyankarpal:main Jun 21, 2024
7 checks passed
@manuelbento19 manuelbento19 deleted the feature/navlink branch June 21, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for reviewers wait for the maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants