Sha256: 4856087f886b6969dde614ae91587418068b2e9a422b20a106529bb06f601130

Contents?: true

Size: 1.39 KB

Versions: 18

Compression:

Stored size: 1.39 KB

Contents

<% example_html = ERB.new(example).result %>

<%= pb_rails("card", props: { classname: "pb--doc", padding: "none", dark: dark }) do %>
  <div class="pb--kit-example">
    <%= pb_rails("caption", props: { text: example_title, dark: dark }) %>
    <br />
    <%= example %>
    <br>
  </div>

  <% if show_code %>
    <div class="markdown pb--kit-example-markdown <%= dark ? "dark" : "" %>">
      <%= render_markdown(description) %>
    </div>
    <div id="code-wrapper">
      <div class="pb--codeControls">
        <ul>
          <% if type == "rails" %>
            <li>
              <a href="#" id="copy-<%= example_key %>-trigger" onclick="copyOnClick(`<%= example_html %>`, `copy-<%= example_key %>`)">
                Copy HTML
              </a>
            </li>
          <% end %>
          <li>
            <a href="#" id="toggle-open" data-toggle="code_example">Code Example</a>
          </li>
        </ul>
      </div>
      <div class="pb--codeCopy" data-action="toggle" data-togglable="code_example" style="display: none" >
        <%= pb_rails("section_separator", props: { dark: dark })%>
        <a href="#" id="toggle-close" data-toggle="false" class="pb--close-toggle">Close</a>
        <pre class="highlight"><%= raw rouge(source, highlighter) %></pre>
      </div>
    </div>
  <% end %>
<% end %>

<script>
  function copyOnClick(content, elementID) {
    copyContent(content)
  }
  
</script>
   

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
playbook_ui-12.20.0.pre.alpha.title2667 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.20.0.pre.alpha.title2665 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.20.0 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.19.0.pre.alpha.PLAY699zindexresponsive650 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.19.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown638 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts632 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.19.0 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown629 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown628 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.play786multilevelselectimprovements627 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown626 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown617 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.PLAY735mobileheadersfix616 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.play786multilevelselectimprovements613 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.PLAY747carddarktokens610 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts608 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts607 app/pb_kits/playbook/pb_docs/kit_example.html.erb
playbook_ui-12.18.0 app/pb_kits/playbook/pb_docs/kit_example.html.erb