mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3965 - Menu components cx implementation fixes
This commit is contained in:
parent
ae3dde1f51
commit
8181d7ee85
7 changed files with 30 additions and 29 deletions
|
@ -35,10 +35,11 @@ const classes = {
|
|||
start: 'p-menu-start',
|
||||
menu: 'p-menu-list p-reset',
|
||||
submenuHeader: 'p-submenu-header',
|
||||
separator: 'p-menuitem-separator',
|
||||
separator: ({ item }) => ['p-menuitem-separator', item.class],
|
||||
end: 'p-menu-end',
|
||||
menuitem: ({ context }) => [
|
||||
menuitem: ({ context, item }) => [
|
||||
'p-menuitem',
|
||||
item.class,
|
||||
{
|
||||
'p-focus': context.id === context.focusedOptionId,
|
||||
'p-disabled': context.disabled()
|
||||
|
@ -52,7 +53,7 @@ const classes = {
|
|||
'router-link-active-exact': context.exact && isExactActive
|
||||
}
|
||||
],
|
||||
icon: 'p-menuitem-icon',
|
||||
icon: ({ item }) => ['p-menuitem-icon', item.icon],
|
||||
label: 'p-menuitem-text'
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue