Sha256: d1c28d8a649b75d7ca3d05a2f80a8e2b8542d11fe15cd1886974bba74a5b1d61

Contents?: true

Size: 1.22 KB

Versions: 56

Compression:

Stored size: 1.22 KB

Contents

<% content_for :title, "#{@component_example.name} example - #{@component_doc.name} component" %>
<% content_for :application_stylesheet do %>
  <% if @component_doc.source == "application" %>
    <%= render 'application_stylesheet' %>
  <% end %>
<% end %>

<%= render 'govuk_publishing_components/components/title', title: @component_example.name, context: "#{@component_doc.name} example", margin_top: 0 %>

<% code_example = capture do %>
  <%= render partial: "govuk_publishing_components/component_guide/component_doc/call", locals: { component_doc: @component_doc, example: @component_example } %>
<% end %>

<div class="component-show">
  <div class="component-doc">
    <div class="component-markdown">
      <%= raw(@component_example.html_description) %>
    </div>
    <h2 class="component-doc-h2">
      How it looks
      <small>(<a href="<%= component_preview_path(@component_doc.id, @component_example.id) %>" class="govuk-link">preview</a>)</small>
    </h2>
    <%= render partial: "govuk_publishing_components/component_guide/component_doc/preview", locals: { component_doc: @component_doc, example: @component_example } %>

    <h2 class="component-doc-h2">How to call this example</h2>
    <%= code_example %>
  </div>
</div>

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
govuk_publishing_components-34.6.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.5.1 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.5.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.4.2 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.4.1 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.4.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.3.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.2.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.1.3 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.1.2 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.1.1 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.1.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-34.0.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-33.1.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-33.0.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-32.1.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-32.0.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-31.2.0 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-31.1.2 app/views/govuk_publishing_components/component_guide/example.html.erb
govuk_publishing_components-31.1.1 app/views/govuk_publishing_components/component_guide/example.html.erb