Sha256: f5f28c2b8980f883ece3070291f1a7abcbf4250a756add0ccad8e6e866ea9d29

Contents?: true

Size: 1.84 KB

Versions: 28

Compression:

Stored size: 1.84 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 %>
    <div class="absolute inset-auto bottom-0 right-0 mb-4 mr-4">
      <%= helpers.svg 'heroicons/solid/information-circle',
        class: 'h-4 text-gray-500 cursor-pointer',
        title: @card.description,
        'data-tippy': 'tooltip',
        'data-target': 'card-description' %>
    </div>
  <% end %>
</div>

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
avo-2.13.2.pre.2 app/components/avo/card_component.html.erb
avo-2.13.2.pre.1 app/components/avo/card_component.html.erb
avo-2.13.1 app/components/avo/card_component.html.erb
avo-2.13.0 app/components/avo/card_component.html.erb
avo-2.12.1.pre.1 app/components/avo/card_component.html.erb
avo-2.12.0 app/components/avo/card_component.html.erb
avo-2.11.3.pre.1 app/components/avo/card_component.html.erb
avo-2.11.2.pre.3 app/components/avo/card_component.html.erb
avo-2.11.2.pre.2 app/components/avo/card_component.html.erb
avo-2.11.2.pre.1 app/components/avo/card_component.html.erb
avo-2.11.1.pre.3 app/components/avo/card_component.html.erb
avo-2.11.1 app/components/avo/card_component.html.erb
avo-2.11.1.pre.2 app/components/avo/card_component.html.erb
avo-2.11.1.pre.1 app/components/avo/card_component.html.erb
avo-2.11.0 app/components/avo/card_component.html.erb
avo-2.10.3.pre.1 app/components/avo/card_component.html.erb
avo-2.10.2 app/components/avo/card_component.html.erb
avo-2.9.2.pre1 app/components/avo/card_component.html.erb
avo-2.10.0 app/components/avo/card_component.html.erb
avo-2.9.1.pre7 app/components/avo/card_component.html.erb