Sha256: 9a0702a1dfcf773801252ae7e562f56e4b793dd140f6aaa83c483fb31cf17fa7

Contents?: true

Size: 519 Bytes

Versions: 10

Compression:

Stored size: 519 Bytes

Contents

<%
  # Buttons should not have link options: href, target
  options = {
    id: object.id,
    data: object.data,
    class: object.classname(object.kit_class),
    disabled: object.disabled,
    aria: object.aria
  }
  link_options = {
    href: object.link,
    target: object.new_window
  }
%>

<%= content_tag(object.tag,
    object.tag == "button" ? options : options.merge(link_options)) do %>
    <%= object.loading_icon %>
    <span class="pb_button_content"><%= object.yield(context: self) %></span>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
playbook_ui-2.9.1 app/pb_kits/playbook/pb_button/_button.html.erb
playbook_ui-2.9.0 app/pb_kits/playbook/pb_button/_button.html.erb
playbook_ui-2.8.9 app/pb_kits/playbook/pb_button/_button.html.erb
playbook_ui-2.8.8 app/pb_kits/playbook/pb_button/_button.html.erb
playbook_ui-2.8.7 app/pb_kits/playbook/pb_button/_button.html.erb
playbook_ui-2.8.6 app/pb_kits/playbook/pb_button/_button.html.erb
playbook_ui-2.8.5 app/pb_kits/playbook/pb_button/_button.html.erb
playbook_ui-2.8.4 app/pb_kits/playbook/pb_button/_button.html.erb
playbook_ui-2.8.3 app/pb_kits/playbook/pb_button/_button.html.erb
playbook_ui-2.8.1 app/pb_kits/playbook/pb_button/_button.html.erb