@@ -6,6 +6,7 @@ import Color (cssStringHSLA)
66import Data.Maybe (Maybe (..))
77import Data.Nullable (toNullable )
88import Effect.Console (log )
9+ import Effect.Uncurried (mkEffectFn1 )
910import Lumi.Components.Button (button , defaults , secondary )
1011import Lumi.Components.Color (colors )
1112import Lumi.Components.Column (column , column_ )
@@ -25,20 +26,23 @@ docs =
2526 , example $
2627 dropdownButton dropdownButtonDefaults
2728 { label = " Dropdown Button"
28- , content = R .div
29+ , content = \closeSelf -> R .div
2930 { style: R .css { width: " 328px" , padding: " 12px" }
3031 , children:
3132 [ button secondary
3233 { title = " I can be any element"
3334 , style = R .css { width: " 100%" , marginBottom: " 8px" }
35+ , onPress = mkEffectFn1 \_ -> closeSelf
3436 }
3537 , button secondary
3638 { title = " I can be any element"
3739 , style = R .css { width: " 100%" , marginBottom: " 8px" }
40+ , onPress = mkEffectFn1 \_ -> closeSelf
3841 }
3942 , button defaults
4043 { title = " I can be any element"
4144 , style = R .css { width: " 100%" }
45+ , onPress = mkEffectFn1 \_ -> closeSelf
4246 }
4347 ]
4448 }
@@ -49,20 +53,23 @@ docs =
4953 dropdownButton dropdownButtonDefaults
5054 { label = " Dropdown Button"
5155 , alignment = toNullable (Just " right" )
52- , content = R .div
56+ , content = \closeSelf -> R .div
5357 { style: R .css { width: " 328px" , padding: " 12px" }
5458 , children:
5559 [ button secondary
5660 { title = " I can be any element"
5761 , style = R .css { width: " 100%" , marginBottom: " 8px" }
62+ , onPress = mkEffectFn1 \_ -> closeSelf
5863 }
5964 , button secondary
6065 { title = " I can be any element"
6166 , style = R .css { width: " 100%" , marginBottom: " 8px" }
67+ , onPress = mkEffectFn1 \_ -> closeSelf
6268 }
6369 , button defaults
6470 { title = " I can be any element"
6571 , style = R .css { width: " 100%" }
72+ , onPress = mkEffectFn1 \_ -> closeSelf
6673 }
6774 ]
6875 }
@@ -77,20 +84,23 @@ docs =
7784 { children:
7885 [ dropdownButton dropdownButtonDefaults
7986 { label = " Dropdown Button"
80- , content = R .div
87+ , content = \closeSelf -> R .div
8188 { style: R .css { width: " 328px" , padding: " 12px" }
8289 , children:
8390 [ button secondary
8491 { title = " I can be any element"
8592 , style = R .css { width: " 100%" , marginBottom: " 8px" }
93+ , onPress = mkEffectFn1 \_ -> closeSelf
8694 }
8795 , button secondary
8896 { title = " I can be any element"
8997 , style = R .css { width: " 100%" , marginBottom: " 8px" }
98+ , onPress = mkEffectFn1 \_ -> closeSelf
9099 }
91100 , button defaults
92101 { title = " I can be any element"
93102 , style = R .css { width: " 100%" }
103+ , onPress = mkEffectFn1 \_ -> closeSelf
94104 }
95105 ]
96106 }
@@ -102,20 +112,23 @@ docs =
102112 { children:
103113 [ dropdownButton dropdownButtonDefaults
104114 { label = " Dropdown Button"
105- , content = R .div
115+ , content = \closeSelf -> R .div
106116 { style: R .css { width: " 328px" , padding: " 12px" }
107117 , children:
108118 [ button secondary
109119 { title = " I can be any element"
110120 , style = R .css { width: " 100%" , marginBottom: " 8px" }
121+ , onPress = mkEffectFn1 \_ -> closeSelf
111122 }
112123 , button secondary
113124 { title = " I can be any element"
114125 , style = R .css { width: " 100%" , marginBottom: " 8px" }
126+ , onPress = mkEffectFn1 \_ -> closeSelf
115127 }
116128 , button defaults
117129 { title = " I can be any element"
118130 , style = R .css { width: " 100%" }
131+ , onPress = mkEffectFn1 \_ -> closeSelf
119132 }
120133 ]
121134 }
@@ -201,20 +214,23 @@ docs =
201214 , h2_ " using an arbitrary icon in place of the button"
202215 , example $
203216 dropdownIcon dropdownIconDefaults
204- { content = R .div
217+ { content = \closeSelf -> R .div
205218 { style: R .css { width: " 328px" , padding: " 12px" }
206219 , children:
207220 [ button secondary
208221 { title = " I can be any element"
209222 , style = R .css { width: " 100%" , marginBottom: " 8px" }
223+ , onPress = mkEffectFn1 \_ -> closeSelf
210224 }
211225 , button secondary
212226 { title = " I can be any element"
213227 , style = R .css { width: " 100%" , marginBottom: " 8px" }
228+ , onPress = mkEffectFn1 \_ -> closeSelf
214229 }
215230 , button defaults
216231 { title = " I can be any element"
217232 , style = R .css { width: " 100%" }
233+ , onPress = mkEffectFn1 \_ -> closeSelf
218234 }
219235 ]
220236 }
0 commit comments