Sha256: f8377366d4c2eef37ac98cd422fa90e8e423d7e8c4378e4dbda08a6cf7783c54
Contents?: true
Size: 776 Bytes
Versions: 1
Compression:
Stored size: 776 Bytes
Contents
<% base_class = "button-primary".freeze # Optional props bordered = local_assigns.fetch(:bordered, false) disabled = local_assigns.fetch(:disabled, false) full_width = local_assigns.fetch(:full_width, false) id = local_assigns.fetch(:id, nil) name = local_assigns.fetch(:name, nil) small = local_assigns.fetch(:small, false) type = local_assigns.fetch(:type, 'button') # Classes class_names = [base_class] class_names.push("#{base_class}--bordered") if bordered class_names.push("#{base_class}--full-width") if full_width class_names.push("#{base_class}--small") if small class_names = class_names.join(" ") %> <%= button_tag( class: class_names, disabled: disabled, id: id, name: name, type: type ) do %> <%= content %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_starter_frontend-0.1.0 | app/views/spree/components/buttons/_button_primary.html.erb |