Sha256: ac5901db487204b3caab3ff117143488e044d185267c2a0a3b87635101cc1be0
Contents?: true
Size: 1.31 KB
Versions: 90
Compression:
Stored size: 1.31 KB
Contents
<% type ||= "rails" %> <% if type == "react" %> <% contents = File.read("#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit_examples[:kit]}/docs/_#{key}.jsx") %> <% else %> <% contents = File.read("#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit_examples[:kit]}/docs/_#{key}.html.erb") %> <% end %> <div class="pb--kit-example"> <%= pb_rails("caption", props: { text: item }) %> <br> <% if type == "rails" %> <%= render partial: "pb_#{@kit_examples[:kit]}/docs/#{key}" %> <% elsif type == "react" %> <%= pb_react(key.camelize) %> <% end %> <br> </div> <% if @show_code%> <div class="markdown pb--kit-example-markdown"> <%= markdown(get_per_sample_descriptions(@kit_examples[:kit], key)) %> </div> <div class="pb--codeControls"> <ul> <li> <a href="#" data-toggle="code_example">Code Example</a> </li> </ul> </div> <div class="pb--codeCopy" data-action="toggle" data-togglable="code_example" style="display: none" > <a href="#" data-toggle="false" class="pb--close-toggle">Close</a> <% if type == "rails" %> <pre class="highlight"><%= raw rouge(contents, "erb") %></pre> <% elsif type == "react" %> <pre class="highlight"><%= raw rouge(contents, "react")%></pre> <% end %> </div> <% end %>
Version data entries
90 entries across 90 versions & 1 rubygems