2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
|
|
|
const inlineStyles = {
|
|
|
|
submenu: ({ instance, processedItem }) => ({ display: instance.isItemActive(processedItem) ? 'block' : 'none' })
|
|
|
|
};
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: ({ instance }) => [
|
|
|
|
'p-menubar p-component',
|
|
|
|
{
|
2023-11-15 10:20:49 +00:00
|
|
|
'p-menubar-mobile': instance.queryMatches,
|
2023-10-02 10:46:09 +00:00
|
|
|
'p-menubar-mobile-active': instance.mobileActive
|
|
|
|
}
|
|
|
|
],
|
|
|
|
start: 'p-menubar-start',
|
|
|
|
button: 'p-menubar-button',
|
2024-04-30 13:03:20 +00:00
|
|
|
rootList: 'p-menubar-root-list',
|
|
|
|
item: ({ instance, processedItem }) => [
|
2024-04-09 13:35:36 +00:00
|
|
|
'p-menubar-item',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
2024-04-09 13:35:36 +00:00
|
|
|
'p-menubar-item-active': instance.isItemActive(processedItem),
|
2023-10-02 10:46:09 +00:00
|
|
|
'p-focus': instance.isItemFocused(processedItem),
|
|
|
|
'p-disabled': instance.isItemDisabled(processedItem)
|
|
|
|
}
|
|
|
|
],
|
2024-04-30 13:03:20 +00:00
|
|
|
itemContent: 'p-menubar-item-content',
|
|
|
|
itemLink: 'p-menubar-item-link',
|
|
|
|
itemIcon: 'p-menubar-item-icon',
|
|
|
|
itemLabel: 'p-menubar-item-label',
|
2024-04-09 13:35:36 +00:00
|
|
|
submenuIcon: 'p-menubar-submenu-icon',
|
2024-04-09 13:43:12 +00:00
|
|
|
submenu: 'p-menubar-submenu',
|
2024-04-09 13:35:36 +00:00
|
|
|
separator: 'p-menubar-separator',
|
2023-10-02 10:46:09 +00:00
|
|
|
end: 'p-menubar-end'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'menubar',
|
|
|
|
classes,
|
|
|
|
inlineStyles
|
|
|
|
});
|