Sha256: 786590c0606ce10bc3bef998c93c1420dab05f8b353970577eb0cf022170f6cd

Contents?: true

Size: 1.03 KB

Versions: 9

Compression:

Stored size: 1.03 KB

Contents

<%
  add_gem_component_stylesheet("contextual-guidance")

  id ||= nil
  title ||= nil
  content ||= nil
  guidance_id ||= nil

  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
  component_helper.set_id(id)
  component_helper.add_class("gem-c-contextual-guidance")
  component_helper.add_data_attribute({ module: "contextual-guidance" })
%>
<%= tag.div(**component_helper.all_attributes) do %>
  <%= tag.div class: "govuk-grid-row" do %>
    <%= tag.div class: "govuk-grid-column-two-thirds" do %>
      <%= tag.div class: "gem-c-contextual-guidance__input-field" do %>
        <%= yield %>
      <% end %>
    <% end %>
    <%= tag.div class: "govuk-grid-column-one-third" do %>
      <%= tag.div class: "gem-c-contextual-guidance__wrapper", for: html_for, id: guidance_id do %>
        <%= tag.div class: "gem-c-contextual-guidance__guidance" do %>
          <%= tag.h2 title, class: "govuk-heading-s" %>
          <%= content %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
govuk_publishing_components-51.1.0 app/views/govuk_publishing_components/components/_contextual_guidance.html.erb
govuk_publishing_components-51.0.0 app/views/govuk_publishing_components/components/_contextual_guidance.html.erb
govuk_publishing_components-50.0.1 app/views/govuk_publishing_components/components/_contextual_guidance.html.erb
govuk_publishing_components-50.0.0 app/views/govuk_publishing_components/components/_contextual_guidance.html.erb
govuk_publishing_components-49.1.0 app/views/govuk_publishing_components/components/_contextual_guidance.html.erb
govuk_publishing_components-49.0.0 app/views/govuk_publishing_components/components/_contextual_guidance.html.erb
govuk_publishing_components-48.0.0 app/views/govuk_publishing_components/components/_contextual_guidance.html.erb
govuk_publishing_components-47.0.0 app/views/govuk_publishing_components/components/_contextual_guidance.html.erb
govuk_publishing_components-46.4.0 app/views/govuk_publishing_components/components/_contextual_guidance.html.erb