@@ -10,8 +10,7 @@ import Type.Proxy (Proxy(Proxy))
10import Data.Undefined.NoProblem (Opt, opt, pseudoMap)
10import Data.Undefined.NoProblem (Opt, opt, pseudoMap)
11import Data.Undefined.NoProblem.Closed (class Coerce, coerce)
11import Data.Undefined.NoProblem.Closed (class Coerce, coerce)
12import Record.Builder (build, insert, modify) as RB
12import Record.Builder (build, insert, modify) as RB
13−import Beta.DOM.Internal (CSS)
13+import Beta.DOM.Internal (class IsJSX, CSS)
16foreign import collapsibleRootImpl :: forall a. ReactComponent { | a }
15foreign import collapsibleRootImpl :: forall a. ReactComponent { | a }
17foreign import collapsibleTriggerImpl :: forall a. ReactComponent { | a }
16foreign import collapsibleTriggerImpl :: forall a. ReactComponent { | a }
@@ -27,7 +26,7 @@ type RootProps =
27 , disabled :: Opt Boolean
26 , disabled :: Opt Boolean
30−root :: forall p. Coerce p RootProps => p -> Array JSX -> JSX
29+root :: forall p kids. IsJSX kids => Coerce p RootProps => p -> kids -> JSX
31root props kids = React.element collapsibleRootImpl
30root props kids = React.element collapsibleRootImpl
32 $ (coerce props :: RootProps) # RB.build
31 $ (coerce props :: RootProps) # RB.build
33 ( RB.modify (Proxy :: _ "onOpenChange") (pseudoMap mkEffectFn1)
32 ( RB.modify (Proxy :: _ "onOpenChange") (pseudoMap mkEffectFn1)
@@ -38,10 +37,10 @@ type TriggerProps =
38 { asChild :: Opt Boolean
37 { asChild :: Opt Boolean
41−trigger :: forall p. Coerce p TriggerProps => p -> JSX -> JSX
40+trigger :: forall p kids. IsJSX kids => Coerce p TriggerProps => p -> kids -> JSX
42−trigger props kid = React.element collapsibleTriggerImpl
41+trigger props kids = React.element collapsibleTriggerImpl
43 $ (coerce props :: TriggerProps) # RB.build
42 $ (coerce props :: TriggerProps) # RB.build
44− ( RB.insert (Proxy :: _ "children") kid
43+ ( RB.insert (Proxy :: _ "children") kids
47type ContentProps =
46type ContentProps =
@@ -49,7 +48,7 @@ type ContentProps =
49 , forceMount :: Opt Boolean
48 , forceMount :: Opt Boolean
52−content :: forall p. Coerce p ContentProps => p -> Array JSX -> JSX
51+content :: forall p kids. IsJSX kids => Coerce p ContentProps => p -> kids -> JSX
53content props kids = React.element collapsibleContentImpl
52content props kids = React.element collapsibleContentImpl
54 $ (coerce props :: ContentProps) # RB.build
53 $ (coerce props :: ContentProps) # RB.build
55 ( RB.insert (Proxy :: _ "children") kids
54 ( RB.insert (Proxy :: _ "children") kids