Skip to content

Commit

Permalink
Dropdown to Use Content Tag instead of pb_content_tag (#3392)
Browse files Browse the repository at this point in the history
Since we are reverting the PR that created the pb_content_tag
[here](#3391), we are
reverting the dropdown kit to NOT use that pb_content_tag
  • Loading branch information
nidaqg authored May 6, 2024
1 parent f05521b commit 7ab95da
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
7 changes: 6 additions & 1 deletion playbook/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<%= pb_content_tag do %>
<%= content_tag(:div,
aria: object.aria,
class: object.classname,
data: object.data,
id: object.id,
**combined_html_options) do %>
<% if object.label.present? %>
<%= pb_rails("caption", props: {text: object.label, margin_bottom:"xs"}) %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<%= pb_content_tag(:div, style: object.container_style) do %>
<%= content_tag(:div,
aria: object.aria,
class: object.classname,
data: object.data,
id: object.id,
style: object.container_style,
**combined_html_options) do %>
<%= pb_rails("list", props: {ordered: false, borderless: false}) do %>
<% if content.present? %>
<%= content.presence %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<%= pb_content_tag do %>
<%= content_tag(:div,
aria: object.aria,
class: object.classname,
data: object.data,
id: object.id,
**combined_html_options) do %>
<%= pb_rails("list/item", props: {
display: "flex",
justify_content: "center",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<%= pb_content_tag do %>
<%= content_tag(:div,
aria: object.aria,
class: object.classname,
data: object.data,
id: object.id,
**combined_html_options) do %>
<% if content.present? %>
<div style="display: inline-block" tabindex="0" data-dropdown-custom-trigger>
<%= content.presence %>
Expand Down

0 comments on commit 7ab95da

Please sign in to comment.