From 98f972e557047a626880692189fdae68269a732e Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 11 Feb 2024 23:11:28 +0200 Subject: menu-item improvements --- src/components/menu_item.style.js | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/components/menu_item.style.js (limited to 'src/components/menu_item.style.js') diff --git a/src/components/menu_item.style.js b/src/components/menu_item.style.js new file mode 100644 index 00000000..43b5c35a --- /dev/null +++ b/src/components/menu_item.style.js @@ -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' + } + } + ] +} -- cgit v1.2.3-70-g09d2