From 53a4b1f9a6a9aa6bc044609c3accb074d924daf9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 31 Jan 2024 17:39:51 +0200 Subject: better virtual components and stuff --- src/components/text.style.js | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'src/components/text.style.js') diff --git a/src/components/text.style.js b/src/components/text.style.js index 050194cb..e52b6f68 100644 --- a/src/components/text.style.js +++ b/src/components/text.style.js @@ -1,7 +1,43 @@ export default { name: 'Text', selector: '/*text*/', + virtual: true, + variants: { + greentext: '.greentext' + }, states: { faint: '.faint' - } + }, + defaultRules: [ + { + component: 'Text', + directives: { + textColor: '--text' + } + }, + { + component: 'Text', + state: ['faint'], + directives: { + textColor: '--text', + textOpacity: 0.5 + } + }, + { + component: 'Text', + variant: 'greentext', + directives: { + textColor: '--cGreen' + } + }, + { + component: 'Text', + variant: 'greentext', + state: ['faint'], + directives: { + textColor: '--cGreen', + textOpacity: 0.5 + } + } + ] } -- cgit v1.2.3-70-g09d2