Sha256: f2211b6fd5b742a0376ba32f6b56940b48056bc787d350966d393a37f9a5ca28

Contents?: true

Size: 1.57 KB

Versions: 419

Compression:

Stored size: 1.57 KB

Contents

<%= content_tag(object.tag,
                object.tag == "button" ? object.options : object.link_options,
                **combined_html_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: { custom_icon: Playbook::Engine::root.join(spinner_path), 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

419 entries across 419 versions & 1 rubygems

Version Path
playbook_ui-14.4.0.pre.alpha.PLAY1546highchartsbump3822 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.alpha.PLAY1562highchartsbump3819 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.5.0.pre.rc.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.3.2.pre.alpha.pbntr523enablekitsforradiofix3809 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.rc.16 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.rc.15 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.rc.14 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.3.2.pre.alpha.PBNTR417addcolorsupdatedefaultcolor3791 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.rc.13 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.3.2.pre.alpha.PBNTR515typeaheadmarginbottomredux3785 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.3.2.pre.alpha.revert3614PBNTR455ganttchartPOC3783 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.rc.12 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.3.2.pre.alpha.play1472newicons3773 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.rc.11 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.3.2.pre.alpha.PBNTR490multilevelselect3771 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.rc.10 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.3.2.pre.alpha.PBNTR490multilevelselect3766 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.rc.9 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-14.4.0.pre.rc.8 app/pb_kits/playbook/pb_button/button.html.erb