Skip to content

Commit

Permalink
fix(menu): focus styles
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterCarl committed Nov 22, 2024
1 parent 9966fe4 commit a6a9146
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/primevue/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ const menu: MenuPassThroughOptions = {
class: tw`ris-body2-regular bg-white shadow`,
},
list: {
class: tw``,
class: tw`focus-visible:outline-none`,
},
item: {
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`,
item: ({ context }) => {
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`;
const focused = tw`outline-none outline-4 outline-offset-4 outline-blue-800`;
return {
class: {
[base]: true,
[focused]: context.focused,
},
};
},
itemContent: {
class: tw`flex h-full items-center py-4`,
Expand Down

0 comments on commit a6a9146

Please sign in to comment.