Sha256: 1f2884e2abdaffe95c76204fa60dbf2b8ac177ca65092df063e0120b988e4676

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 Bytes

Contents

<%
  base_class = "checkbox-input".freeze

  # Optional props
  checked = local_assigns.fetch(:checked, false)
  disabled = local_assigns.fetch(:disabled, false)
  id = local_assigns.fetch(:id, nil)
  value = local_assigns.fetch(:value, nil)

  # Classes
  class_names = [base_class]
  class_names = class_names.join(" ")
%>

<label
  class="<%= class_names %>"
  <% if id %>
    for="<%= id %>"
  <% end %>
>
  <%= check_box_tag(
    name,
    value,
    checked,
    disabled: disabled,
    id: id
  ) %>
  <%= label %>
</label>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_starter_frontend-0.1.0 app/views/spree/components/forms/inputs/_checkbox_input.html.erb