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.14.0.pre.alpha.PLAY1109bugdisplaypropblocksfontcolor1784 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.14.0.pre.alpha.play1106filter1751 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.14.0.pre.alpha.play1106filter1748 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.14.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.13.0.pre.alpha.PLAY1097linterenhancedelement1728 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.13.0.pre.alpha.play10821727 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.13.0.pre.alpha.play10821726 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.13.0.pre.alpha.play10221678 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.13.0.pre.alpha.PLAY1090csstokens1675 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.13.0.pre.alpha.play900startratingasinput1657 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.13.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.12.0.pre.alpha.PLAY880cardkithighlightzindex1655 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1627 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1626 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1624 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1623 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1612 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1611 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1609 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1608 app/pb_kits/playbook/pb_button/button.html.erb