pleroma-fe/src/components/menu_item.style.js

63 lines
1 KiB
JavaScript
Raw Normal View History

2024-02-11 21:11:28 +00:00
export default {
name: 'MenuItem',
selector: '.menu-item',
validInnerComponents: [
'Text',
'Icon',
'Input',
'Border',
2024-02-15 22:29:16 +00:00
'ButtonUnstyled',
'Badge'
2024-02-11 21:11:28 +00:00
],
states: {
hover: ':hover',
2024-02-13 00:09:43 +00:00
active: '.active'
2024-02-11 21:11:28 +00:00
},
defaultRules: [
{
directives: {
background: '--bg',
opacity: 0
}
},
{
state: ['hover'],
directives: {
background: '$mod(--bg, 5)',
opacity: 1
2024-02-11 21:11:28 +00:00
}
},
2024-02-13 00:09:43 +00:00
{
state: ['active'],
directives: {
background: '$mod(--bg, 5)',
opacity: 1
}
},
2024-02-11 21:11:28 +00:00
{
component: 'Text',
variant: 'normal',
parent: {
component: 'MenuItem',
state: ['normal', 'hover'],
variant: 'normal'
},
directives: {
textColor: '--link',
textAuto: 'no-preserve'
}
},
{
component: 'Icon',
parent: {
component: 'MenuItem',
state: ['hover']
},
directives: {
textColor: '--link',
textAuto: 'no-preserve'
}
}
]
}