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.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2023 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2010 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.16.0.pre.alpha.PLAY11642006 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary1995 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary1993 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.16.0.pre.alpha.PLAY11641992 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.16.0.pre.alpha.PLAY11641991 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.16.0.pre.alpha.fonttest1972 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.15.0.pre.alpha.play1141iconkitusinglibrary1956 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.16.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.15.0.pre.alpha.play10841940 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.15.0.pre.alpha.1132globalpropdatepickerspacing1929 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.15.0.pre.alpha.PLAY10851907 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.15.0.pre.alpha.PLAY11311893 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.15.0.pre.alpha.reactselectbump581876 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.15.0.pre.alpha.PLAY10831873 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.14.0.pre.alpha.play1101betaicons1825 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.14.0.pre.alpha.play1101betaicons1798 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.14.0.pre.alpha.play1120lintdatepicker1797 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.15.0 app/pb_kits/playbook/pb_button/button.html.erb