@@ -10,8 +10,7 @@ import Type.Proxy (Proxy(Proxy))
1010import Data.Undefined.NoProblem (Opt, opt, pseudoMap)
1111import Data.Undefined.NoProblem.Closed (class Coerce, coerce)
1212import Record.Builder (build, insert, modify) as RB
13−import Beta.DOM.Internal (CSS)
14−
13+import Beta.DOM.Internal (class IsJSX, CSS)
1514
1615foreign import collapsibleRootImpl :: forall a. ReactComponent { | a }
1716foreign import collapsibleTriggerImpl :: forall a. ReactComponent { | a }
@@ -27,7 +26,7 @@ type RootProps =
2726 , disabled :: Opt Boolean
2827 }
2928
30−root :: forall p. Coerce p RootProps => p -> Array JSX -> JSX
29+root :: forall p kids. IsJSX kids => Coerce p RootProps => p -> kids -> JSX
3130root props kids = React.element collapsibleRootImpl
3231 $ (coerce props :: RootProps) # RB.build
3332 ( RB.modify (Proxy :: _ "onOpenChange") (pseudoMap mkEffectFn1)
@@ -38,10 +37,10 @@ type TriggerProps =
3837 { asChild :: Opt Boolean
3938 }
4039
41−trigger :: forall p. Coerce p TriggerProps => p -> JSX -> JSX
42−trigger props kid = React.element collapsibleTriggerImpl
40+trigger :: forall p kids. IsJSX kids => Coerce p TriggerProps => p -> kids -> JSX
41+trigger props kids = React.element collapsibleTriggerImpl
4342 $ (coerce props :: TriggerProps) # RB.build
44− ( RB.insert (Proxy :: _ "children") kid
43+ ( RB.insert (Proxy :: _ "children") kids
4544 )
4645
4746type ContentProps =
@@ -49,7 +48,7 @@ type ContentProps =
4948 , forceMount :: Opt Boolean
5049 }
5150
52−content :: forall p. Coerce p ContentProps => p -> Array JSX -> JSX
51+content :: forall p kids. IsJSX kids => Coerce p ContentProps => p -> kids -> JSX
5352content props kids = React.element collapsibleContentImpl
5453 $ (coerce props :: ContentProps) # RB.build
5554 ( RB.insert (Proxy :: _ "children") kids