playbook_ui 13.29.0.pre.alpha.testingcollapsibleissue3052 → 13.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +6 -2
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/version.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 699fcf293689b40e1140baca1e97a25053e322b9a4ca658717617798da963051
|
4
|
+
data.tar.gz: ef6ec517ea86e4440ee1bc196b05f9e449c7f1b9cd17dad24875193f1f5474d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5bae58e45a15ac46583dcbe34055089959cd988b1dc9f430340b550e35567d397dfd9a803f12ae4c4e7f14fdfa4cb1ae019f5cf085eb86c632644a655a188e1
|
7
|
+
data.tar.gz: 6e38e6533e9b495cdd3b7c2b85c37a57c37b4174eadbff01c77f939a65d67944d84e0db24af5247e7586374b1ce04314403e98570e1742feb68e8aaf68297b84
|
@@ -60,13 +60,14 @@ const Collapsible = ({
|
|
60
60
|
}
|
61
61
|
|
62
62
|
const FirstChild = children[0]
|
63
|
+
const SecondChild = children[1]
|
63
64
|
|
64
65
|
const Main = FirstChild.type === CollapsibleMain ? FirstChild : null
|
65
|
-
const Content =
|
66
|
+
const Content = SecondChild.type === CollapsibleContent ? SecondChild : null
|
66
67
|
|
67
68
|
|
68
69
|
const { children: mainChildren = null, ...mainProps } = Main ? Main.props : {}
|
69
|
-
const { children: contentChildren, ...contentProps } = Content.props
|
70
|
+
const { children: contentChildren = null, ...contentProps } = Content ? Content.props : {}
|
70
71
|
const ariaProps = buildAriaProps(aria)
|
71
72
|
const dataProps = buildDataProps(data)
|
72
73
|
const htmlProps = buildHtmlProps(htmlOptions)
|
@@ -91,9 +92,12 @@ const Collapsible = ({
|
|
91
92
|
) : (
|
92
93
|
FirstChild
|
93
94
|
)}
|
95
|
+
|
96
|
+
{Content && (
|
94
97
|
<CollapsibleContent {...contentProps}>
|
95
98
|
{contentChildren}
|
96
99
|
</CollapsibleContent>
|
100
|
+
)}
|
97
101
|
</div>
|
98
102
|
</CollapsibleContext.Provider>
|
99
103
|
)
|