% example_html = ERB.new(example).result %>
<%= pb_rails("card", props: { classname: "pb--doc", padding: "none", dark: dark }) do %>
<% unless (type == "swift") %>
<%= pb_rails("caption", props: { text: example_title, dark: dark }) %>
<%= example %>
<% else %>
">
<%= pb_rails("caption", props: { text: example_title, dark: dark, margin_top: "md" }) %>
<%= render_markdown(description) %>
<% end %>
<% if show_code && type != "swift" %>
">
<%= render_markdown(description) %>
<% hide_button = type == "rails" ? 'flex' : 'none' %>
-
<%= pb_rails("button", props: { id:"copy-html-#{example_key}", icon: "copy", text: "Copy HTML", classname: dark ? "dark" : "", variant: "link", size: "sm", display: hide_button }) %>
-
<%= pb_rails("button", props: { icon: "code", classname: dark ? "dark" : "", id:"toggle-open-opened", text: "Close Code", variant: "link", size: "sm", display: "none" }) %>
<%= pb_rails("button", props: { icon: "code", classname: dark ? "dark" : "", id:"toggle-open-closed", text: "Show Code", variant: "link", size: "sm" }) %>
<%= pb_rails("popover", props: {
trigger_element_id: "copy-button-#{example_key}",
tooltip_id: "tooltip-#{example_key}",
offset: true,
position: "bottom"
}) do %>
Code Copied
<% end %>
<% end %>
<% end %>