playbook_ui 13.29.0.pre.alpha.removeduplicatekitexampleclass3063 → 13.29.0.pre.alpha.testingcollapsibleissue3052

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 380bc9dbd82972a5698de51d570cdfa2487487e31ae0f45b412dfb9d1279e886
4
- data.tar.gz: be0a2d1f71353e2b24d0f2741bff4febb39ac02734390403c54fe2ebd3a89312
3
+ metadata.gz: a4dfe0653d86e536e79e7cd2537477204d815b54a27255442ac5ba1d6df6ac6d
4
+ data.tar.gz: 8da9b6c0fb744f9a37347fdf3bec56a8c435a3aeeab1933d3441ef5cb6f846fb
5
5
  SHA512:
6
- metadata.gz: 929cda18e0b40680958fb5191785efd526c02d7fff5a04a2007d27ab9913425f6c2068d3084e66572056d7b6e22bac471dccf8f081bcb4000fe3673080b232ad
7
- data.tar.gz: 01eb9044256743a84f1d3b34439ef8402db96f39e2c175b65996381307a7f467cdbb352a98afc634ab30996195a818691a59340846ba2a1c23b4c879d825383b
6
+ metadata.gz: 478df642a3c3079adf7eb546dc8f3a938717d5bb0f50d32e8dd70ebac1f6c16909fa21e613a262e2c94dcafbd5649acb2a2d3daa682ddc5a3f7961986d5aac37
7
+ data.tar.gz: 0ed83b2e971d7bbf15df28168199a3a9d063abc043df74ea6ac1db4c95cbcfec79883f6c5cba1be43fe9fe9375d26f252ee07ed7f91781035837c8903314a766
@@ -60,14 +60,13 @@ const Collapsible = ({
60
60
  }
61
61
 
62
62
  const FirstChild = children[0]
63
- const SecondChild = children[1]
64
63
 
65
64
  const Main = FirstChild.type === CollapsibleMain ? FirstChild : null
66
- const Content = SecondChild.type === CollapsibleContent ? SecondChild : null
65
+ const Content = children[1]
67
66
 
68
67
 
69
68
  const { children: mainChildren = null, ...mainProps } = Main ? Main.props : {}
70
- const { children: contentChildren = null, ...contentProps } = Content ? Content.props : {}
69
+ const { children: contentChildren, ...contentProps } = Content.props
71
70
  const ariaProps = buildAriaProps(aria)
72
71
  const dataProps = buildDataProps(data)
73
72
  const htmlProps = buildHtmlProps(htmlOptions)
@@ -92,12 +91,9 @@ const Collapsible = ({
92
91
  ) : (
93
92
  FirstChild
94
93
  )}
95
-
96
- {Content && (
97
94
  <CollapsibleContent {...contentProps}>
98
95
  {contentChildren}
99
96
  </CollapsibleContent>
100
- )}
101
97
  </div>
102
98
  </CollapsibleContext.Provider>
103
99
  )
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # rubocop:disable Style/CaseLikeIf
4
+
4
5
  module Playbook
5
6
  module PbDocs
6
7
  class KitExample < Playbook::KitBase
@@ -11,8 +12,6 @@ module Playbook
11
12
  prop :type, type: Playbook::Props::Enum, values: %w[rails react swift], default: "rails"
12
13
  prop :dark, type: Playbook::Props::Boolean, default: false
13
14
 
14
- include PlaybookWebsite::Markdown::Helper
15
-
16
15
  def example
17
16
  if type == "rails"
18
17
  render inline: source
@@ -61,7 +60,6 @@ module Playbook
61
60
  .gsub("'../..'", "'playbook-ui'")
62
61
  .gsub(%r{from "../.*}, "from 'playbook-ui'")
63
62
  .gsub(%r{from '../.*}, "from 'playbook-ui'")
64
- .gsub("'../../../../../../playbook-website/app/javascript/scripts/custom-icons'", "'your-directory/custom-icons.js'")
65
63
  stringified_code = dark ? stringified_code.gsub("{...props}", "dark") : stringified_code.gsub(/\s*{...props}\s*\n/, "\n")
66
64
  if stringified_code.include?("props: { ")
67
65
  stringified_code = stringified_code.gsub("props: {", "props: {dark: true,") if type == "rails" && dark