aboutsummaryrefslogtreecommitdiff
path: root/src/components/list/list_item.style.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2024-02-29 17:49:56 +0200
committerHenry Jameson <me@hjkos.com>2024-02-29 17:49:56 +0200
commit28c7fac9f0b740473575200051bc2983ec5c9be9 (patch)
treeb079ae51ff67d8ece4b9012d49ab71c884dba500 /src/components/list/list_item.style.js
parent3f6b9fbf9cc59d5ae20f9bda7c8fdf9f55d5675e (diff)
implement list item styles
Diffstat (limited to 'src/components/list/list_item.style.js')
-rw-r--r--src/components/list/list_item.style.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/components/list/list_item.style.js b/src/components/list/list_item.style.js
new file mode 100644
index 00000000..ae8dc5f4
--- /dev/null
+++ b/src/components/list/list_item.style.js
@@ -0,0 +1,48 @@
+export default {
+ name: 'ListItem',
+ selector: '.list-item',
+ states: {
+ active: '.-active',
+ hover: ':hover'
+ },
+ validInnerComponents: [
+ 'Text',
+ 'Link',
+ 'Icon',
+ 'Border',
+ 'Button',
+ 'ButtonUnstyled',
+ 'RichContent',
+ 'Input',
+ 'Avatar'
+ ],
+ defaultRules: [
+ {
+ directives: {
+ background: '--bg',
+ opacity: 0
+ }
+ },
+ {
+ state: ['active'],
+ directives: {
+ background: '--inheritedBackground, 10',
+ opacity: 1
+ }
+ },
+ {
+ state: ['hover'],
+ directives: {
+ background: '--inheritedBackground, 10',
+ opacity: 1
+ }
+ },
+ {
+ state: ['hover', 'active'],
+ directives: {
+ background: '--inheritedBackground, 20',
+ opacity: 1
+ }
+ }
+ ]
+}