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.19.0.pre.alpha.PBNTR207tabledivsupport2245 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.19.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.thor93bargraphoptions2219 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.thor93bargraphoptions2211 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.play1141iconkitusinglibrary2210 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.PLAY12062203 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.powercentrainplaybookpt22201 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.PLAY8672199 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.PBNTR191AdvancedTableFinalFixes2197 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.dependabotnpmandyarnreactrouterdom62212196 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.dependabotnpmandyarntypescripteslintparser56202194 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.PLAY12062192 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.useexactnodejsversionghactions2183 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.useexactnodejsversionghactions2181 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.useexactnodejsversionghactions2180 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.useexactnodejsversionghactions2179 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.PBNTR191AdvancedTableFinalFixes2178 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.PLAY12062177 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.PBNTR191AdvancedTableFinalFixes2176 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.18.0.pre.alpha.dependabotnpmandyarnpowerhomeplaybookicons001alpha52175 app/pb_kits/playbook/pb_button/button.html.erb