fix(orders): status summary cards with borders + larger text
This commit is contained in:
parent
4459d03932
commit
3a402f7f74
|
|
@ -353,20 +353,33 @@ const StatusSummary = ({ order }) => {
|
|||
|
||||
if (items.length === 0) return null;
|
||||
|
||||
const toneStyles = {
|
||||
ok: "border-[rgba(18,128,92,0.25)] bg-[var(--color-accent-soft)]",
|
||||
warning: "border-[rgba(245,158,11,0.3)] bg-[rgba(245,158,11,0.06)]",
|
||||
danger: "border-[rgba(239,68,68,0.3)] bg-[rgba(239,68,68,0.06)]",
|
||||
muted: "border-[var(--color-border)] bg-[var(--color-surface)]",
|
||||
};
|
||||
const textStyles = {
|
||||
ok: "text-[var(--color-accent)]",
|
||||
warning: "text-[var(--color-warning)]",
|
||||
danger: "text-[var(--color-danger)]",
|
||||
muted: "text-[var(--color-text-muted)]",
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-1 gap-1.5 sm:grid-cols-2">
|
||||
<div className="grid grid-cols-1 gap-2 sm:grid-cols-2">
|
||||
{items.map((item, i) => (
|
||||
<div key={i} className="flex items-center gap-2 rounded-lg bg-[var(--color-surface)] px-3 py-1.5">
|
||||
<span className="text-sm flex-shrink-0">{item.icon}</span>
|
||||
<span className="text-xs text-[var(--color-text-muted)] flex-shrink-0">{item.label}:</span>
|
||||
<span className={`text-xs font-medium truncate ${
|
||||
item.tone === "ok" ? "text-[var(--color-accent)]"
|
||||
: item.tone === "warning" ? "text-[var(--color-warning)]"
|
||||
: item.tone === "danger" ? "text-[var(--color-danger)]"
|
||||
: "text-[var(--color-text-muted)]"
|
||||
}`}>
|
||||
{item.value}
|
||||
</span>
|
||||
<div
|
||||
key={i}
|
||||
className={`flex items-center gap-2.5 rounded-xl border px-3 py-2.5 ${toneStyles[item.tone] || toneStyles.muted}`}
|
||||
>
|
||||
<span className="text-base flex-shrink-0">{item.icon}</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="text-[11px] font-medium text-[var(--color-text-muted)] leading-tight">{item.label}</p>
|
||||
<p className={`text-sm font-semibold truncate ${textStyles[item.tone] || textStyles.muted}`}>
|
||||
{item.value}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue