priyankarpal / projectshut

Projectshut is an open source web app that enables users to freely publish their projects and create user profiles within the platform ✨🚀
https://www.projectshut.tech
MIT License
397 stars 492 forks source link

feat: Add NavLink component with dynamic className support #2538

Closed manuelbento19 closed 1 month ago

manuelbento19 commented 1 month ago

What feature?

Description

Currently, I am proposing to add a NavLink component to the project with support for defining className dynamically. This will allow for greater flexibility in styling links based on different conditions.

Proposed Implementation Details

The NavLink component will be developed with the following characteristics:

Example of use

import NavLink from 'components/NavLink';

<NavLink href="/dashboard" className={(active) => active ? 'active-link' : 'inactive-link'}>
  Dashboard
</NavLink>

Add screenshots

image

Record

github-actions[bot] commented 1 month ago

To reduce notifications, issues are locked. Your issue will be unlock when we will add label as 🏁 status: ready for dev. Check out the contributing guide for more information.