@@ -25,30 +25,33 @@ keyValueList
25
25
keyValueList { rightAligned, rows, borders } =
26
26
let
27
27
lumiKeyValueListElement = element (R .unsafeCreateDOMComponent " lumi-key-value-list" )
28
+ lumiKeyValueListLabelElement = element (R .unsafeCreateDOMComponent " lumi-key-value-list-label" )
29
+ lumiKeyValueListValueElement = element (R .unsafeCreateDOMComponent " lumi-key-value-list-value" )
28
30
29
31
toRows r =
30
32
r <#> \{ label, value } ->
31
33
[ row
32
34
{ style: R .css
33
35
{ alignItems: " center"
36
+ , justifyContent: " space-between"
37
+ , width: " 100%"
34
38
}
35
39
, children:
36
- [ T .text T .body
37
- { style = R .css
38
- { flex: " 3 5 0%"
39
- , padding: " 8px 0"
40
- }
41
- , color = notNull colorNames.black1
42
- , children = [ R .text label ]
40
+ [ lumiKeyValueListLabelElement
41
+ { children:
42
+ [ T .text T .body
43
+ { style = R .css {}
44
+ , color = notNull colorNames.black1
45
+ , children = [ R .text label ]
46
+ }
47
+ ]
48
+ , style: R .css {}
43
49
}
44
- , row
45
- { style: R .css
46
- { alignItems: " center"
47
- , flex: " 7 7 0%"
48
- , flexWrap: " wrap"
49
- , justifyContent: if rightAligned then " flex-end" else " flex-start"
50
+ , lumiKeyValueListValueElement
51
+ { children: [ value ]
52
+ , style: R .css
53
+ { justifyContent: if rightAligned then " flex-end" else " flex-start"
50
54
}
51
- , children: [ value ]
52
55
}
53
56
]
54
57
}
@@ -71,7 +74,26 @@ styles :: JSS
71
74
styles = jss
72
75
{ " @global" :
73
76
{ " lumi-key-value-list" :
74
- {
77
+ { " & lumi-key-value-list-label" :
78
+ { " flex" : " 3 5 0%"
79
+ , " padding" : " 8px 0"
80
+ }
81
+ , " & lumi-key-value-list-value" :
82
+ { " display" : " flex"
83
+ , " flexFlow" : " row"
84
+ , " alignItems" : " center"
85
+ , " flex" : " 7 7 0%"
86
+ , " flexWrap" : " wrap"
87
+ }
88
+ , " @media (max-width: 860px)" :
89
+ { " width" : " 100%"
90
+ , " & lumi-key-value-list-label" :
91
+ { " flex" : " initial"
92
+ }
93
+ , " & lumi-key-value-list-value" :
94
+ { " flex" : " initial"
95
+ }
96
+ }
75
97
}
76
98
}
77
99
}
0 commit comments