playbook_ui_docs 13.27.0.pre.alpha.testingcollapsible2912 → 13.27.0.pre.alpha.testingcollapsible2917

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a85374fd9143acd2db66e83e92a0dce23993dc763dd17a10f4a4c15c241b1d0
4
- data.tar.gz: eb3fa1cc1d0e7031301cf09e24cf73005111ed1363a3bd1b467792df66690572
3
+ metadata.gz: c4d6b57eeffaa765c9c090f0c5a1383d3a0d936f584100c34e4a2d54d0bc49bb
4
+ data.tar.gz: a7ff852dfc6a775fb551257485d008ca23e3dd799849a7854b8346c2ce511f36
5
5
  SHA512:
6
- metadata.gz: 9d955d8734dbdeadfa5963b331acb768b79d991ae9052633659630d9a8578e62bfd9869a75de17cdd6b9aa79b65ad777ee171c40526a1d1ebc38c4027b233f45
7
- data.tar.gz: d34ee87e7f1540dc1c700445e1a666cdc026a50a944d96e5f3273207026d56f24f8870546c7c85437ddd8464020ade6cc34fb497303f3ba1b95ed0d09bcd3f25
6
+ metadata.gz: d90ee5ae388bd319bb2523813c5be923c5d46d7b9fc68bc03126f01a86f47250e48d43daa3505495b3688d24569c0f8fbe71de634df6224581e2ae6bd01f65a1
7
+ data.tar.gz: f027b32612d0bf2a761b4197f14e91eca40ebe1f858283fe729f81cbdbad6548bab1d33efd01b959e6dc594a41a02d3cc3f4a7a47a8d0774520a22a8a38679cc
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Collapsible, useCollapsible, Background, Flex, Title, IconCircle, List, ListItem } from '../..'
2
+ import { Collapsible, useCollapsible, Background, Flex, Title, List, ListItem } from '../..'
3
3
 
4
4
  const CollapsibleCustomMain = () => {
5
5
  const [isCollapsed, setIsCollapsed] = useCollapsible(true)
@@ -25,10 +25,7 @@ const CollapsibleCustomMain = () => {
25
25
  size={4}
26
26
  text="Custom Main Section"
27
27
  />
28
- <IconCircle
29
- icon="check"
30
- size="xs"
31
- />
28
+ <Collapsible.Icon collapsed={isCollapsed}/>
32
29
  </Flex>
33
30
  </Background>
34
31
  <Collapsible.Content padding="none">
@@ -0,0 +1,5 @@
1
+ A custom Main section can also be used in place of the provided `Collapsible.Main`. This gives devs full control over that subcomponent. For example, here we are using global props to make that custom Main 'sticky' on scroll.
2
+
3
+ If a custom component is used in place of the default, devs must handle collapsible toggling themselves via the useCollapsible hook as seen in this example.
4
+
5
+ The default Collapsible icon can also be used as part of the custom Main as shown, you will need to pass the Collapsible state to the `collapsed` prop on the optional `Collapsible.Icon`.
@@ -2,10 +2,7 @@
2
2
  <%= pb_rails("background", props: { background_color: "white", position: "sticky", top: "0", cursor:"pointer", data: {"collapsible-main": "true"} }) do %>
3
3
  <%= pb_rails("flex", props: {align:"center", gap:"sm", justify:"between"}) do %>
4
4
  <%= pb_rails("title", props: { text: "Custom Main Section", tag: "h4", size: 4 }) %>
5
- <%= pb_rails("icon_circle", props: {
6
- icon: "check",
7
- size: "xs"
8
- }) %>
5
+ <%= pb_rails("collapsible/collapsible_icon") %>
9
6
  <% end %>
10
7
  <% end %>
11
8
  <%= pb_rails("flex", props: { align: "center", justify: "between" }) do %>
@@ -0,0 +1,5 @@
1
+ A custom Main section can also be used in place of the provided `collapsible/collapsible_main`. This gives devs full control over that subcomponent. For example, here we are using global props to make that custom Main 'sticky' on scroll.
2
+
3
+ If a custom component is used in place of the default, devs must add `data: {"collapsible-main": "true"}` to the custom Main for toggling of the collapsible to work correctly.
4
+
5
+ The default Collapsible icon can also be used as part of the custom Main as shown with the optional `collapsible/collapsible_icon`. This optional subcomponent accepts all icon related props `color`, `icon` and `size`.
@@ -7,7 +7,7 @@ examples:
7
7
  - collapsible_icons: Custom Icons
8
8
  - collapsible_external_controls: Toggle Collapsible With External Controls
9
9
  - collapsible_external_controls_multiple: Toggle All Collapsibles With One Control
10
- - collapsible_custom_main: Custom Main
10
+ - collapsible_custom_main_rails: Custom Main Section
11
11
 
12
12
  react:
13
13
  - collapsible_default: Default
@@ -15,7 +15,7 @@ examples:
15
15
  - collapsible_color: Icon Color
16
16
  - collapsible_icons: Custom Icons
17
17
  - collapsible_state: useCollapsible Hook
18
- - collapsible_custom_main: Custom Main
18
+ - collapsible_custom_main: Custom Main Section
19
19
 
20
20
 
21
21
  swift: