Refactor #3965 - For Menu & Breadcrumb

pull/4004/head
Tuğçe Küçükoğlu 2023-05-29 14:13:36 +03:00
parent 5bdc39cda1
commit 36c5fc3e7b
2 changed files with 6 additions and 6 deletions

View File

@ -42,11 +42,11 @@ const classes = {
home: 'p-breadcrumb-home',
separator: 'p-menuitem-separator',
menuitem: ({ context }) => ['p-menuitem', { 'p-disabled': context.disabled() }],
action: ({ context, routerProps }) => [
action: ({ context, isActive, isExactActive }) => [
'p-menuitem-link',
{
'router-link-active': routerProps && routerProps.isActive,
'router-link-active-exact': context.exact && routerProps && routerProps.isExactActive
'router-link-active': isActive,
'router-link-active-exact': context.exact && isExactActive
}
],
icon: 'p-menuitem-icon',

View File

@ -45,11 +45,11 @@ const classes = {
}
],
content: 'p-menuitem-content',
action: ({ context, routerProps }) => [
action: ({ context, isActive, isExactActive }) => [
'p-menuitem-link',
{
'router-link-active': routerProps && routerProps.isActive,
'router-link-active-exact': context.exact && routerProps && routerProps.isExactActive
'router-link-active': isActive,
'router-link-active-exact': context.exact && isExactActive
}
],
icon: 'p-menuitem-icon',