Sha256: be7b72d7a3606c018afdecf7a33312a542874a61f791a2bb77af9d3dfadba93f

Contents?: true

Size: 1.48 KB

Versions: 169

Compression:

Stored size: 1.48 KB

Contents

<%= content_tag(object.tag,
    object.tag == "button" ? object.options : object.link_options) do %>
    <% if object.variant === "reaction" %>
        <% if icon && object.valid_emoji(object.icon) %>
            <%= pb_rails("flex", props:{ align: "center" }) do %>
                <%= pb_rails("icon", props: { icon: "#{icon}"}) %>
                <% if object.count %>
                    <%= pb_rails("caption", props: { text: "#{count}", size: "xs", padding_left:"xxs" }) %>
                <% end %>
            <% end %>
        <% elsif !object.valid_emoji(object.icon) %>
            <% if object.icon %>
                <%= pb_rails("icon", props: { icon: "#{icon}" }) %>
            <% else %>
                <%= pb_rails("icon", props: { icon: "face-smile-plus" }) %>
            <% end %>
        <% end %>
    <% else %>
    <% if object.icon && !object.icon_right %>
        <span>
            <%= pb_rails("icon", props: { icon: "#{icon}", fixed_width: true, margin_right: "xs", font_style: object.icon_font_family }) %>
        </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", font_style: object.icon_font_family }) %>
        </span>
    <% end %>
    <% end %>

<% end %>

Version data entries

169 entries across 169 versions & 1 rubygems

Version Path
playbook_ui-13.6.0.pre.alpha.tiptapreacthookformbug1210 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.6.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.5.0.pre.alpha.play984collapsiblekithidestooltips1203 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1191 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1188 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.5.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.4.0.pre.alpha.PLAY973Hash1181 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.4.0.pre.alpha.play961turnoffdeprecationwarnings1171 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.4.0 app/pb_kits/playbook/pb_button/button.html.erb