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.21.0.pre.alpha.PLAY12652489 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.21.0.pre.alpha.pbntr220improveexpansionspeed2451 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.21.0.pre.alpha.PBNTR224letuserresetrowexpansion2441 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.21.0.pre.alpha.PBNTR225advancedtablefeedback2438 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.21.0.pre.alpha.PBNTR238DatePickerYearBug2436 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.21.0.pre.alpha.pbntr220improveexpansionspeed2431 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.21.0.pre.alpha.pbntr220improveexpansionspeed2415 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.20.0.pre.alpha.PLAY12572402 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.21.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.20.0.pre.alpha.PBNTR225advancedtablefeedback2375 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0.pre.alpha.PBNTR200addadvancedtablekitdarkmodestyles2346 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2345 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2342 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0.pre.alpha.play1186collapsiblenaviconcolorbug2321 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0.pre.alpha.PBNTR211tablekitsubcomponentsreact2318 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2306 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2305 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.20.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0.pre.alpha.play1141iconkitusinglibrary2264 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0.pre.alpha.PBNTR207tabledivsupport2261 app/pb_kits/playbook/pb_button/button.html.erb