Skip to content

Commit 5b1b0f9

Browse files
enhance(ui): added selectors for hover and pressed to shadcn button and sidebarmenubutton (#5493)
* enhance(ui): added selectors for hover and pressed to shadcn button * enhance(ui): added selectors for hover and pressed to shadcn sidebarmenubutton
1 parent 62107f6 commit 5b1b0f9

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

apps/frontend/components/ui/button.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ export const ButtonMeta: CodeComponentMeta<ButtonPropsWithMeta> = {
9494
type: "eventHandler",
9595
argTypes: [{ name: "event", type: "object" }],
9696
},
97+
className: {
98+
type: "class",
99+
selectors: [
100+
{
101+
selector: ":hover",
102+
label: "Hovered",
103+
},
104+
{
105+
selector: ":active",
106+
label: "Pressed",
107+
},
108+
],
109+
},
97110
},
98111
};
99112

apps/frontend/components/ui/sidebar.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,19 @@ const SidebarMenuButtonMeta: CodeComponentMeta<SidebarMenuButtonProps> = {
737737
type: "choice",
738738
options: ["default", "sm", "lg"],
739739
},
740+
className: {
741+
type: "class",
742+
selectors: [
743+
{
744+
selector: ":hover",
745+
label: "Hovered",
746+
},
747+
{
748+
selector: ":active",
749+
label: "Pressed",
750+
},
751+
],
752+
},
740753
},
741754
};
742755

0 commit comments

Comments
 (0)