Sha256: cd09cdc14055e5b5d0d0fe59b53c4df307d6c97a1bc0c885092bb79b7a0db7ab

Contents?: true

Size: 1.41 KB

Versions: 41

Compression:

Stored size: 1.41 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" }) %>
        </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" }) %>
        </span>
    <% end %>
    <% end %>

<% end %>

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
playbook_ui-13.3.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.2.0.pre.alpha.PLAY986dateTimeRounding1150 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.2.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.1.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41129 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41128 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41126 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.0.0.pre.alpha.salesbookmismatchingdate1120 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.39.0.pre.alpha.salesbookmismatchingdate1117 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-13.0.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.39.0.pre.alpha.PLAY966collapsiblenav41115 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.39.0.pre.alpha.salesbookmismatchingdate1114 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.39.0 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.38.0.pre.alpha.PBNTR78selectkitmultipleprop1094 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.38.0.pre.alpha.PLAY932removemomentqp1088 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.38.0.pre.alpha.PLAY966collapsiblenav41086 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.38.0.pre.alpha.audiencesalpha1083 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.38.0.pre.alpha.PLAY966collapsiblenav41082 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.38.0.pre.alpha.PLAYaddingdatapropselectkit1080 app/pb_kits/playbook/pb_button/button.html.erb
playbook_ui-12.37.0.pre.alpha.PLAY951collapsiblenav31078 app/pb_kits/playbook/pb_button/button.html.erb