@@ -11,22 +11,18 @@ import Lumi.Components.Size (Size(..))
1111import React.Basic (Component , JSX , createComponent , element , makeStateless )
1212import React.Basic.DOM as R
1313
14- type CommonListProps rest =
14+ type ListProps =
1515 { size :: Maybe Size
1616 , rightAligned :: Boolean
1717 , rows :: Array (Array JSX )
18- | rest
18+ , borders :: Boolean
1919 }
2020
21- type ListProps = CommonListProps
22- ( borders :: Boolean
23- )
24-
2521component :: Component ListProps
2622component = createComponent " List"
2723
28- listComponent :: ListProps -> JSX
29- listComponent = makeStateless component $ lumiList <<< mapProps
24+ list :: ListProps -> JSX
25+ list = makeStateless component $ lumiList <<< mapProps
3026 where
3127 mapProps props =
3228 { className: " lumi"
@@ -49,35 +45,20 @@ listComponent = makeStateless component $ lumiList <<< mapProps
4945 lumiListRow = element (R .unsafeCreateDOMComponent " lumi-list-row" )
5046 lumiListRowCell = element (R .unsafeCreateDOMComponent " lumi-list-row-cell" )
5147
52- list :: CommonListProps () -> JSX
53- list props =
54- listComponent
55- { size: props.size
56- , rightAligned: props.rightAligned
57- , rows: props.rows
58- , borders: true
59- }
60-
61- defaultList :: CommonListProps ()
48+ defaultList :: ListProps
6249defaultList =
6350 { size: Just $ Medium
6451 , rightAligned: false
6552 , rows: []
53+ , borders: true
6654 }
6755
68- compactList :: CommonListProps ()
56+ compactList :: ListProps
6957compactList =
7058 { size: Just $ Small
7159 , rightAligned: false
7260 , rows: []
73- }
74-
75- borderlessList :: ListProps
76- borderlessList =
77- { size: Just $ Medium
78- , rightAligned: false
79- , rows: []
80- , borders: false
61+ , borders: true
8162 }
8263
8364type StructuredColumnListProps row =
@@ -99,6 +80,7 @@ structuredColumnList = makeStateless structuredColumnListComponent render
9980 { size: Just $ Large
10081 , rightAligned: props.rightAligned
10182 , rows: map renderRow props.rows
83+ , borders: true
10284 }
10385 where
10486 renderRow row =
0 commit comments