syntaxui icon indicating copy to clipboard operation
syntaxui copied to clipboard

[BUG]: Button Component Missing Active State

Open shrix1 opened this issue 1 year ago • 2 comments

Description 📝

There is no active state on button component in sidebar : https://syntaxui.com/components/button/neubrutalism-button

Screenshot 2024-05-08 at 2 24 10 PM

How to Fix:

Active state should look something like this:

Screenshot 2024-05-08 at 2 32 50 PM

Link 🔗

https://syntaxui.com/components/button/neubrutalism-button

shrix1 avatar May 08 '24 09:05 shrix1

I think the pathname changes when you in a child page. What can be done is add the active state to the child pages

The-CodeINN avatar May 09 '24 07:05 The-CodeINN

This might be the intended functionality.

But, if we wanted to change it to include the subitems too, we can change Navigation.tsx:

let isActiveGroup = group.links.findIndex((link) => link.href === pathname) !== -1

This is how the current tab is selected, we can use includes instead of === or something like that.

epoll31 avatar May 09 '24 12:05 epoll31