Sha256: b8a9028b07d66250c295cedafaca260eed011e312d0a3ad608285a7d57a8866a

Contents?: true

Size: 1.87 KB

Versions: 39

Compression:

Stored size: 1.87 KB

Contents

<div class="relative flex-1 flex flex-col justify-between h-full"
  data-controller="dashboard-card"
  data-dashboard-card-target="card"
  data-refresh-every="<%= @card.refresh_every %>"
  data-card-id="<%= @card.id %>"
  data-card-index="<%= @card.index %>">
  <% if @card.class.display_header %>
    <div class="px-4 pt-4">
      <div class="flex justify-between items-center min-h-6">
        <div class="text-base font-bold text-gray-700 leading-none">
          <%= @card.label %>
        </div>
        <div data-controller="select">
          <% if @card.type.in?([:metric, :chartkick, :partial]) && @card.ranges.present? %>
            <%= select_tag "#{@card.id}_#{@card.index}_range", options_for_select(@card.ranges, @card.range),
              class: 'appearance-none inline-flex bg-blue-gray-100 disabled:bg-blue-gray-300 disabled:cursor-not-allowed focus:bg-white text-sm text-blue-gray-700 disabled:text-blue-gray-700 leading-none rounded-md py-px px-2 leading-tight border outline-none outline w-24',
              data: {
                target: 'select',
                action: 'change->select#onChange'
              }
            %>
          <% end %>
        </div>
      </div>
    </div>
  <% end %>
  <% if @card.type == :chartkick %>
    <%= render 'chartkick_card', card: @card %>
  <% elsif @card.type === :partial %>
    <%= render @card.class.partial %>
  <% elsif @card.type === :metric %>
    <div class="flex-1 flex px-4 pb-4">
      <%= render 'metric_card', card: @card %>
    </div>
  <% end %>
  <% if @card.description.present? %>
    <%= content_tag :div, class: "absolute inset-auto bottom-0 right-0 mb-4 mr-4",
      title: @card.description,
      data: {
        target: 'card-description',
        tippy: 'tooltip',
      } do %>
      <%= helpers.svg 'heroicons/solid/information-circle', class: 'h-4 text-gray-500 cursor-pointer' %>
    <% end %>
  <% end %>
</div>

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
avo-2.19.0 app/components/avo/card_component.html.erb
avo-2.18.1 app/components/avo/card_component.html.erb
avo-2.18.1.pre.1.eagerloaddirs app/components/avo/card_component.html.erb
avo-2.18.0 app/components/avo/card_component.html.erb
avo-2.17.1.pre.5.stackedlayout app/components/avo/card_component.html.erb
avo-2.17.1.pre.4.issue.1342 app/components/avo/card_component.html.erb
avo-2.17.1.pre.3 app/components/avo/card_component.html.erb
avo-2.17.1.pre.2.customauthorizationclients app/components/avo/card_component.html.erb
avo-2.17.1.pre.1.zeitwerk.eager.load.dir app/components/avo/card_component.html.erb
avo-2.17.0 app/components/avo/card_component.html.erb
avo-2.16.1.pre.1.nativefields app/components/avo/card_component.html.erb
avo-2.16.0 app/components/avo/card_component.html.erb
avo-2.15.3 app/components/avo/card_component.html.erb
avo-2.15.3.pre.1.data.attrs.to.sidebar.items app/components/avo/card_component.html.erb
avo-2.15.2 app/components/avo/card_component.html.erb
avo-2.15.2.pre.1 app/components/avo/card_component.html.erb
avo-2.15.1 app/components/avo/card_component.html.erb
avo-2.15.0 app/components/avo/card_component.html.erb
avo-2.14.3.pre.7.polytranslations1 app/components/avo/card_component.html.erb
avo-2.14.3.pre.6.nosprockets app/components/avo/card_component.html.erb