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

91 lines
1.5 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',
'Avatar'
2024-02-11 21:11:28 +00:00
],
states: {
hover: ':hover',
2024-02-29 15:49:56 +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, 10)',
opacity: 1
}
},
{
state: ['active', 'hover'],
directives: {
background: '$mod(--bg, 15)',
2024-02-13 00:09:43 +00:00
opacity: 1
}
},
2024-02-11 21:11:28 +00:00
{
component: 'Text',
parent: {
component: 'MenuItem',
state: ['hover']
},
directives: {
textColor: '--link',
textAuto: 'no-preserve'
}
},
{
component: 'Text',
parent: {
component: 'MenuItem',
state: ['active']
},
directives: {
textColor: '--link',
textAuto: 'no-preserve'
}
},
{
component: 'Icon',
parent: {
component: 'MenuItem',
state: ['active']
2024-02-11 21:11:28 +00:00
},
directives: {
textColor: '--link',
textAuto: 'no-preserve'
}
},
{
component: 'Icon',
parent: {
component: 'MenuItem',
state: ['hover']
},
directives: {
textColor: '--link',
textAuto: 'no-preserve'
}
}
]
}