Skip to content

Commit

Permalink
fix(tree): apply hover styling to secondary text of selected node
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo225 committed Oct 25, 2024
1 parent cf14ee3 commit f3bf801
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/primevue/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ const tree: TreePassThroughOptions = {
nodeLabel: ({ context }) => {
const base = tw`group flex w-full flex-col items-start outline-none *:w-full *:outline-none group-hover:text-black [&>*:first-child]:group-hover:underline [&>*:last-child]:group-hover:no-underline`;
const selected = tw`text-black [&>*:last-child:is(span)]:text-gray-900`;
const hoverSelected = tw`[&>*:last-child]:group-hover:text-black`;

return {
class: {
[base]: true,
[selected]: context.selected,
[hoverSelected]: context.selected,
},
};
},
Expand Down

0 comments on commit f3bf801

Please sign in to comment.