Sha256: 198d314cb717d94b87b1a270f037ded9abc8b7bbea935f5dcae87bd5246fab43

Contents?: true

Size: 1.03 KB

Versions: 59

Compression:

Stored size: 1.03 KB

Contents

<%
  class_name = "gem-c-search--on-white"
  class_name = "gem-c-search--on-govuk-blue" if local_assigns[:on_govuk_blue].eql?(true)
  size ||= ""
  class_name = "#{class_name} gem-c-search--large" if size == 'large'
  class_name = "#{class_name} gem-c-search--separate-label" if local_assigns.include?(:inline_label)

  value ||= ""
  id ||= "search-main-" + SecureRandom.hex(4)
  label_text ||= "Search GOV.UK"
  name ||= 'q'
  aria_controls ||= nil
%>

<div class="gem-c-search <%= class_name %>" data-module="gem-toggle-input-class-on-focus">
  <label for="<%= id %>" class="gem-c-search__label">
    <%= label_text %>
  </label>
  <div class="gem-c-search__item-wrapper">
    <input type="search" value="<%= value %>"
      id="<%= id %>" name="<%= name %>" title="Search"
      aria-controls="<%= aria_controls %>"
      class="gem-c-search__item gem-c-search__input js-class-toggle">
    <div class="gem-c-search__item gem-c-search__submit-wrapper">
      <button type="submit" class="gem-c-search__submit">Search</button>
    </div>
  </div>
</div>

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
govuk_publishing_components-21.60.3 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.60.2 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.60.1 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.60.0 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.59.0 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.58.0 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.57.1 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.57.0 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.56.2 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.56.1 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.56.0 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.55.4 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.55.3 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.55.2 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.55.1 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.55.0 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.54.0 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.53.0 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.52.1 app/views/govuk_publishing_components/components/_search.html.erb
govuk_publishing_components-21.52.0 app/views/govuk_publishing_components/components/_search.html.erb