Sha256: 0feb128da76fd65f8c8a0b19e0a962c9308c38538a7f472ada4209e5392ae2b5

Contents?: true

Size: 538 Bytes

Versions: 555

Compression:

Stored size: 538 Bytes

Contents

<%
component_code =
  if example.has_block?
    "<%= render \"#{@component_doc.partial_path}\", #{example.pretty_data} do %\>\n" +
    "  #{example.block.html_safe}" +
    "<% end %\>"
  else
    "<%= render \"#{@component_doc.partial_path}\", #{example.pretty_data} %\>"
  end

code =
  if example.has_embed?
    example.embed.sub("<%= component %\>", component_code)
  else
    component_code
  end
%>
<div class="component-call component-highlight" contenteditable>
  <pre><code><%= example.highlight_code(code) %></code></pre>
</div>

Version data entries

555 entries across 555 versions & 1 rubygems

Version Path
govuk_publishing_components-45.7.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-45.6.1 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-45.6.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-45.5.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-45.4.1 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-45.4.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-45.3.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-45.2.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-45.1.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-45.0.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.11.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.10.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.9.1 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.9.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.8.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.7.1 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.7.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.6.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.5.0 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
govuk_publishing_components-44.4.2 app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb