primevue-mirror/components/lib/menubar/style/MenubarStyle.js

41 lines
1.2 KiB
JavaScript
Raw Normal View History

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',
{
'p-menubar-mobile': instance.queryMatches,
'p-menubar-mobile-active': instance.mobileActive
}
],
start: 'p-menubar-start',
button: 'p-menubar-button',
menu: 'p-menubar-root-list',
menuitem: ({ instance, processedItem }) => [
2024-04-09 13:35:36 +00:00
'p-menubar-item',
{
2024-04-09 13:35:36 +00:00
'p-menubar-item-active': instance.isItemActive(processedItem),
'p-focus': instance.isItemFocused(processedItem),
'p-disabled': instance.isItemDisabled(processedItem)
}
],
2024-04-09 13:35:36 +00:00
content: 'p-menubar-item-content',
action: 'p-menubar-item-link',
icon: 'p-menubar-item-icon',
label: 'p-menubar-item-label',
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',
end: 'p-menubar-end'
};
export default BaseStyle.extend({
name: 'menubar',
classes,
inlineStyles
});