StatusTag.tsx
473 Bytes
import { UTag } from '@uj/ui';
import { STORE_STATUS, type StoreStatus } from '@/config/storeStatus';
/** 门店状态徽标(对应 PRD §4.2 状态规范) */
export function StatusTag({ status }: { status?: StoreStatus | string | null }) {
const meta = STORE_STATUS[status as StoreStatus] ?? { label: status || '—', color: 'default' };
return (
<UTag color={meta.color} style={{ marginInlineEnd: 0, borderRadius: 6 }}>
{meta.label}
</UTag>
);
}