Sha256: 1d74eb56c64fe47fc1fddb70c4be2e3b2904c22a313856ed2a5b5cfca35a7131

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 Bytes

Contents

<%
  base_class = "radio-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 %>
>
  <%= radio_button_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/_radio_input.html.erb