menu-item improvements

This commit is contained in:
Henry Jameson 2024-02-11 23:11:28 +02:00
commit 98f972e557
16 changed files with 209 additions and 251 deletions

View file

@ -0,0 +1,45 @@
export default {
name: 'MenuItem',
selector: '.menu-item',
validInnerComponents: [
'Text',
'Icon',
'Input',
'Border'
],
states: {
hover: ':hover',
active: 'active'
},
defaultRules: [
{
directives: {
background: '--fg'
}
},
{
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'
}
}
]
}