Sha256: 2feb84f62b69610e06ffd6bd6f425266ed7a9652052e2c765c51b4a41f0d93e2

Contents?: true

Size: 1.4 KB

Versions: 405

Compression:

Stored size: 1.4 KB

Contents

<%= content_tag(:div,
    id: object.id,
    data: object.data,
    class: object.classname) do %>
  <%
    # convert deprecated prop values
    size = object.size
    size = "sm" if object.size == "xs"
    size = "md" if object.size == "lg"
  %>
  <% if size == "md" %>
    <% if object.show_icon %>
      <%= pb_rails("body", props: { color: "light", tag: "span"}) do %>
        <%= pb_rails("icon", props: { icon: "clock", fixed_width: true }) %>
      <% end %>
    <% end %>
    <%= pb_rails("body", props: { tag: "span", text: object.format_time_string, classname: "pb_time" }) %>
    <% if object.show_timezone %>
      <%= pb_rails("body", props: { color: "light", tag: "span", text: object.pb_date_time.to_timezone.upcase }) %>
    <% end %>
  <% else %>
    <% if object.show_icon %>
      <%= pb_rails("body", props: { color: "light", tag: "span"}) do %>
        <%= pb_rails("icon", props: { icon: "clock", fixed_width: true, size: "sm" }) %>
      <% end %>
    <% end %>
    
    <%= pb_rails("caption", props: { color: "light", tag: "span", text: object.format_time_string }) do %>
      <%= content_tag(:time, datetime: object.pb_date_time.to_iso) do %>
        <%= object.format_time_string %>
        <% if object.show_timezone %>
          <span class="pb_time_timezone">
            <%= object.pb_date_time.to_timezone.upcase %>
          </span>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

405 entries across 405 versions & 1 rubygems

Version Path
playbook_ui-12.14.0 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.13.0.pre.alpha.PLAY693tooltipwrongbg440 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.13.0.pre.alpha.addingProductTokens439 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.13.0.pre.alpha.PLAY705phonenumberkit438 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.13.0 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.12.0.pre.alpha.PLAY697sandpacklayoutstyles413 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.12.0 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.11.0 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.10.0.pre.alpha.PLAY705phonenumberreturn372 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.10.0.pre.alpha.PLAY677richtexteditorts370 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.10.0 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.9.1.pre.alpha.play664tiptapinvestigation353 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.9.1.pre.alpha.PLAY689bugtxtinputlabel346 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.9.1.pre.alpha.menucleanup345 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.9.1.pre.alpha.menucleanup342 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.9.1 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.9.0 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.8.0.pre.alpha.PLAY625phonenumberdark301 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.8.0.pre.alpha.PLAY625phonenumberdark300 app/pb_kits/playbook/pb_time/time.html.erb
playbook_ui-12.8.0.pre.alpha.PLAY649mapkitstyles299 app/pb_kits/playbook/pb_time/time.html.erb