Skip to content

Commit a6a9146

Browse files
committed
fix(menu): focus styles
1 parent 9966fe4 commit a6a9146

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/primevue/menu/menu.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ const menu: MenuPassThroughOptions = {
66
class: tw`ris-body2-regular bg-white shadow`,
77
},
88
list: {
9-
class: tw``,
9+
class: tw`focus-visible:outline-none`,
1010
},
11-
item: {
12-
class: tw`relative h-48 pl-16 pr-12 after:absolute after:-bottom-1 after:left-16 after:right-16 after:border-b after:border-gray-300 after:content-[''] last:after:border-b-0 hover:bg-gray-100`,
11+
item: ({ context }) => {
12+
const base = tw`relative h-48 pl-16 pr-12 after:absolute after:-bottom-1 after:left-16 after:right-16 after:border-b after:border-gray-300 after:content-[''] last:after:border-b-0 hover:bg-gray-100`;
13+
const focused = tw`outline-none outline-4 outline-offset-4 outline-blue-800`;
14+
return {
15+
class: {
16+
[base]: true,
17+
[focused]: context.focused,
18+
},
19+
};
1320
},
1421
itemContent: {
1522
class: tw`flex h-full items-center py-4`,

0 commit comments

Comments
 (0)