Sha256: d721d6e5265f3a87b542a9895f0c66c09566c42ce1ace1776fc6bb932a24e7d2

Contents?: true

Size: 1.19 KB

Versions: 2

Compression:

Stored size: 1.19 KB

Contents

<%= content_tag(object.tag,
    object.tag == "button" ? object.options : object.link_options) do %>
    <% if object.variant === "reaction" %>
        <% if object.icon %>
            <div class="reaction_button_icon_wrapper">
                <%= pb_rails("icon", props: { icon: "#{icon}"}) %>
                <% if object.count %>
                    <%= pb_rails("caption", props: { text: "#{count}", size: "xs", padding_left:"xxs" }) %>
                <% end %>
            </div>
        <% else %>
            <%= pb_rails("icon", props: { icon: "face-smile-plus" }) %>
        <% end %>
    <% else %>
    <% if object.icon && !object.icon_right %>
        <span>
            <%= pb_rails("icon", props: { icon: "#{icon}", fixed_width: true, margin_right: "xs" }) %>
        </span>
    <% end %>
    <%= pb_rails("icon", props: { icon: "spinner", pulse: true, fixed_width: true, classname: "loading-icon" }) %>
    <span class="pb_button_content"><%= content.presence || object.text %></span>
    <% if object.icon && object.icon_right %>
        <span>
            <%= pb_rails("icon", props: { icon: "#{icon}", fixed_width: true, margin_left: "xs" }) %>
        </span>
    <% end %>
    <% end %>

<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
playbook_ui-12.33.0.pre.alpha.PLAY905reactionbuttons982 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.33.0.pre.alpha.PLAY905reactionbuttons979 app/pb_kits/playbook/pb_button/button.html.erb