@@ -25,30 +25,33 @@ keyValueList
2525keyValueList { rightAligned, rows, borders } =
2626 let
2727 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" )
2830
2931 toRows r =
3032 r <#> \{ label, value } ->
3133 [ row
3234 { style: R .css
3335 { alignItems: " center"
36+ , justifyContent: " space-between"
37+ , width: " 100%"
3438 }
3539 , 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 {}
4349 }
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"
5054 }
51- , children: [ value ]
5255 }
5356 ]
5457 }
@@ -71,7 +74,26 @@ styles :: JSS
7174styles = jss
7275 { " @global" :
7376 { " 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+ }
7597 }
7698 }
7799 }
0 commit comments