Sha256: 3bfd3e8d350a04ad926532e8c3ad1a759fe1dbd2945d1024a278cfd75c4c05cb

Contents?: true

Size: 768 Bytes

Versions: 5

Compression:

Stored size: 768 Bytes

Contents

<% button = GovukPublishingComponents::Presenters::ButtonHelper.new(local_assigns) %>

<% start_button_text = capture do %>
  <%= button.text %>
  <svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" role="presentation" focusable="false">
    <path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" />
  </svg>
<% end %>

<%
  if button.start
    button_text = start_button_text
  else
    button_text = button.text
  end
%>

<% if button.link? %>
  <%= link_to button_text, button.href, button.html_options %>
<% else %>
  <%= content_tag :button, button_text, button.html_options %>
<% end %>

<% if button.info_text %>
  <%= tag.span button.info_text, class: button.info_text_classes %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
govuk_publishing_components-21.47.0 app/views/govuk_publishing_components/components/_button.html.erb
govuk_publishing_components-21.46.0 app/views/govuk_publishing_components/components/_button.html.erb
govuk_publishing_components-21.45.0 app/views/govuk_publishing_components/components/_button.html.erb
govuk_publishing_components-21.44.0 app/views/govuk_publishing_components/components/_button.html.erb
govuk_publishing_components-21.43.0 app/views/govuk_publishing_components/components/_button.html.erb