mirror of
https://github.com/rowtype-yoga/ry-blocks.git
synced 2024-09-11 21:38:06 +03:00
Export select properly
This commit is contained in:
parent
5e02d08f48
commit
30e091a2ae
@ -10,6 +10,7 @@ import Yoga.Block.Atom.Icon as Icon
|
||||
import Yoga.Block.Atom.Image as Image
|
||||
import Yoga.Block.Atom.Input as Input
|
||||
import Yoga.Block.Atom.Range as Range
|
||||
import Yoga.Block.Atom.Select as Select
|
||||
import Yoga.Block.Atom.Segmented as Segmented
|
||||
import Yoga.Block.Atom.Toggle as Toggle
|
||||
import Yoga.Block.Container as Container
|
||||
@ -152,6 +153,12 @@ layer = React.element layer'
|
||||
range ∷ ∀ p q. Union p q Range.Props ⇒ ReactComponent { | p }
|
||||
range = Range.component
|
||||
|
||||
select' ∷ ∀ a. ReactComponent (Select.Props a)
|
||||
select' = Select.component
|
||||
|
||||
select ∷ ∀ a. (Select.Props a) → JSX
|
||||
select = React.element select'
|
||||
|
||||
segmented' ∷ ReactComponent Segmented.Props
|
||||
segmented' = Segmented.component
|
||||
|
||||
|
@ -7,16 +7,15 @@ import Yoga.Block.Atom.Select.Style as Style
|
||||
import React.Basic.DOM as R
|
||||
import React.Basic.Hooks as React
|
||||
|
||||
component ∷
|
||||
∀ a.
|
||||
ReactComponent
|
||||
( { choice ∷ a
|
||||
, choices ∷ Array a
|
||||
, onChange ∷ Array a → Effect Unit
|
||||
, toString ∷ a → String
|
||||
, toValue ∷ a → String
|
||||
}
|
||||
)
|
||||
type Props a =
|
||||
{ choice ∷ a
|
||||
, choices ∷ Array a
|
||||
, onChange ∷ Array a → Effect Unit
|
||||
, toString ∷ a → String
|
||||
, toValue ∷ a → String
|
||||
}
|
||||
|
||||
component ∷ ∀ a. ReactComponent (Props a)
|
||||
component = unsafePerformEffect do
|
||||
React.reactComponent "Select" \{ toString, toValue, choices } → React.do
|
||||
pure $
|
||||
|
Loading…
Reference in New Issue
Block a user