Skip to content

Modular logistics and supply chain operating system (LSOS)

1.2 KB
Raw Blame
<div class="admin-dashboard-widget flex h-full flex-col overflow-hidden rounded-md border bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800" ...attributes>
    <div class="border-b border-gray-100 px-3 py-2.5 dark:border-gray-700">
        <div class="text-xs font-bold uppercase text-gray-900 dark:text-gray-100">{{this.title}}</div>
        <div class="text-[11px] text-gray-500 dark:text-gray-400">Legacy overview widget</div>
    </div>

    <div class="grid flex-1 grid-cols-2 gap-2 p-3">
        {{#if this.error}}
            <div class="col-span-2 flex items-center justify-center text-xs font-medium text-rose-600 dark:text-rose-300">{{this.error}}</div>
        {{else if this.load.isRunning}}
            <div class="col-span-2 flex items-center justify-center"><Spinner /></div>
        {{else}}
            {{#each this.items as |item|}}
                <div class="rounded-md border border-gray-100 p-2 dark:border-gray-700">
                    <div class="truncate text-[10px] font-bold uppercase text-gray-500 dark:text-gray-400">{{item.label}}</div>
                    <div class="mt-1 text-xl font-bold text-gray-900 dark:text-gray-100">{{item.value}}</div>
                </div>
            {{/each}}
        {{/if}}
    </div>
</div>