playbook_ui 13.9.0.pre.alpha.play845allkitsbytypes1260 → 13.9.0.pre.alpha.play845allkitsbytypes1263

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: e47bda24af6edbc23255faea9e74418ea82ec02ecafbcce245aca51ead067eb8
4
- data.tar.gz: 7a6417c7fded6d9f5117ed28bcb7207a7d9d286611140aa9d82db0879f91cec6
3
+ metadata.gz: 46007f2f1ef36ad550a50a69cb3cba12635054933359cf2e3e213a899b274a56
4
+ data.tar.gz: a960f5d51bf2219ab25bf9bcb50b1c6b1eb9f27498a585ad4238fdd898413407
5
5
  SHA512:
6
- metadata.gz: 0a40703a2cbcc0e1fc98ee91a0ba73d219ce1f8172975022c722c3ca425d005a8a05bd3f7290c3bf558a036a53b82a32ea89bad388e5338af9424c66c4ff07ce
7
- data.tar.gz: f0275c462194c5c2db72f027a0e7347cf423e72e50e1004b6e65fe2b10962b993c3cc88e534e87a4ebeee7778f20abace8b3c2ec42e8dcfbdabd1e5512f0ce24
6
+ metadata.gz: 1dd6619147cda00d230a6dc4f2010a96936f482d2d70d367c32ebe2bda44831cc5face8947d7e9ac8ba3bc4d1bde7da38dbff35845ec649dff79fadacfa71680
7
+ data.tar.gz: 434f294ee2b796ffa2d4ea5fce5bafa8d38d85026102ffc633f7ad4158b2b37f1a69ea898591a42052a579251a01d280b2175854f0f71d77b12984920167f8b8
@@ -2,6 +2,10 @@
2
2
 
3
3
  module Playbook
4
4
  module PbDocHelper
5
+ def render_markdown(text)
6
+ PlaybookWebsite::Markdown::Helper.markdown(text)
7
+ end
8
+
5
9
  def pb_kit_title(title)
6
10
  title.remove("pb_").titleize.tr("_", " ")
7
11
  end
@@ -69,26 +73,23 @@ module Playbook
69
73
  component_content = ""
70
74
 
71
75
  # Check if parent_kit is not nil
72
- # Check if type is not "swift"
73
- if parent_kit && type != "swift"
74
- # Filter components based on the specified type
75
- components = parent_kit["components"].select { |component| component["platforms"].include?(type) }
76
-
77
- # If it's a parent with components, accumulate the UI content for child components
78
- if components.any?
79
- component_content = components.map do |component|
80
- component_name = component["name"]
81
- title = pb_doc_render_clickable_title(component_name, type) # Use component_name for the title
82
-
83
- # Render the component UI content with the same styles/tags as the parent
84
- component_ui = raw("<div class='pb--docItem-ui'>
76
+ # Filter components based on the specified type
77
+ components = parent_kit["components"].select { |component| component["platforms"].include?(type) }
78
+
79
+ # If it's a parent with components, accumulate the UI content for child components
80
+ if components.any?
81
+ component_content = components.map do |component|
82
+ component_name = component["name"]
83
+ title = pb_doc_render_clickable_title(component_name, type) # Use component_name for the title
84
+
85
+ # Render the component UI content with the same styles/tags as the parent
86
+ component_ui = raw("<div class='pb--docItem-ui'>
85
87
  #{pb_kit(kit: component_name, type: type, show_code: code, limit_examples: limit_examples, dark_mode: dark_mode)}
86
88
  </div>")
87
89
 
88
- # Combine the component name and component UI content
89
- "#{title}#{component_ui}"
90
- end.join.to_s
91
- end
90
+ # Combine the component name and component UI content
91
+ "#{title}#{component_ui}"
92
+ end.join.to_s
92
93
  end
93
94
 
94
95
  # Return the component_content
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "13.9.0"
5
- VERSION = "13.9.0.pre.alpha.play845allkitsbytypes1260"
5
+ VERSION = "13.9.0.pre.alpha.play845allkitsbytypes1263"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.9.0.pre.alpha.play845allkitsbytypes1260
4
+ version: 13.9.0.pre.alpha.play845allkitsbytypes1263
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX