Repository navigation
Forward icon class to sidebar group icon - #2844
Open
ghabriel25 wants to merge 3 commits into
Open
ghabriel25 wants to merge 3 commits into
ghabriel25 wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The scenario
Currently when using expandable sidebar group with a heading, there is no way to modify icon class (e.g. color using
text-orange-500) withicon:classattribute forwarding likeflux::buttonandflux::togglealready has.The only workaround is to use
iconslot but this might cause some issue because whenever sidebar collapsed into icon only, it uses some default classThe problem
Sidebar group icon class was hardcoded in their component and there is no pre-setup to get it from
icon:classattribute.The solution
Defined icon class which can contains
icon:classattribute value and use fixed size followingflux::sidebar.item:Now user can define
icon:classattribute to modify the iconNote
We could support
sidebar.itemas well but for now I'll keep it focus on the current issueFixes #2843