Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAY-1752] Implement pb_content_tag #4203

Merged
merged 4 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions playbook/app/pb_kits/playbook/pb_icon/icon.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
<%= object.icon.html_safe %>
</span>
<% else %>
<%= content_tag(:i, nil,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options
) %>
<%= pb_content_tag(:i) do %>
<% end %>
<%= content_tag(:span, nil,
nidaqg marked this conversation as resolved.
Show resolved Hide resolved
aria: { label: "#{object.icon} icon" }.merge(object.aria),
hidden: true
Expand Down
6 changes: 1 addition & 5 deletions playbook/app/pb_kits/playbook/pb_layout/body.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<%= content_tag(object.tag,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= content.presence %>
<% end %>
6 changes: 1 addition & 5 deletions playbook/app/pb_kits/playbook/pb_layout/footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<%= content_tag(object.tag,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= content.presence %>
<% end %>
6 changes: 1 addition & 5 deletions playbook/app/pb_kits/playbook/pb_layout/header.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<%= content_tag(object.tag,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= content.presence %>
<% end %>
6 changes: 1 addition & 5 deletions playbook/app/pb_kits/playbook/pb_layout/item.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= content %>
<% end %>
6 changes: 1 addition & 5 deletions playbook/app/pb_kits/playbook/pb_layout/layout.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= content.presence %>
<% end %>
6 changes: 1 addition & 5 deletions playbook/app/pb_kits/playbook/pb_layout/sidebar.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= content.presence %>
<% end %>
7 changes: 1 addition & 6 deletions playbook/app/pb_kits/playbook/pb_legend/legend.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<%= content_tag(:div, object.text,
aria: object.aria,
nidaqg marked this conversation as resolved.
Show resolved Hide resolved
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= pb_rails("body", props: {color: object.body_color}) do %>
<span style="<%= object.custom_color %>" class=<%= object.custom_color_class %>></span>
<%= pb_rails("title", props: { dark: object.dark, text: object.prefix_text, tag: "span", size: 4 }) %>
Expand Down
7 changes: 1 addition & 6 deletions playbook/app/pb_kits/playbook/pb_message/message.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<%= content_tag(:div,
aria: object.aria,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<% if object.valid? %>
<%= pb_rails("avatar", props: {
name: object.avatar_name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.classname,
aria: object.aria,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= content %>
<% end %>
Loading