@@ -0,0 +1,44 @@
1+module Story.Yoga.Block.Atom.Select where
2+
3+import Prelude
4+
5+import Effect (Effect)
6+import Effect.Unsafe (unsafePerformEffect)
7+import React.Basic (JSX, element, fragment)
8+import React.Basic.DOM (css)
9+import React.Basic.DOM as R
10+import React.Basic.Emotion as E
11+import Storybook.Addon.Actions (action)
12+import Yoga.Block.Atom.Select as Select
13+import Yoga.Block.Container.Style as Styles
14+
15+default ∷
16+ { decorators ∷ Array (Effect JSX → JSX)
17+ , title ∷ String
18+ }
19+default =
20+ { title: "Atom/Select"
21+ , decorators:
22+ [ \storyFn →
23+ R.div_
24+ [ element E.global { styles: Styles.global }
25+ , unsafePerformEffect storyFn
26+ ]
27+ ]
28+ }
29+
30+select ∷ Effect JSX
31+select =
32+ pure
33+ $ fragment
34+ [ R.div_
35+ [ R.h2_ [ R.text "Select" ]
36+ , element Select.component
37+ { choice: 1
38+ , choices: [ 1, 2, 3 ]
39+ , onChange: action "changed"
40+ , toString: show
41+ , toValue: show
42+ }
43+ ]
44+ ]