aboutsummaryrefslogtreecommitdiff
path: root/src/components/list/list_item.style.js
blob: e82a0a8308187126bc638d17b00a1f9fadc40864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
export default {
  name: 'ListItem',
  selector: '.list-item',
  states: {
    active: '.-active',
    hover: ':hover:not(.-non-interactive)'
  },
  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
      }
    }
  ]
}