25 lines
1.0 KiB
TypeScript
25 lines
1.0 KiB
TypeScript
import { Text } from '~/components/ui/text';
|
|
import { getModelFileName, isBrandedQr } from '~/services/asset-media';
|
|
import type { ArAsset } from '~/types/asset';
|
|
|
|
export function AssetDetailList({ asset }: { asset: ArAsset }) {
|
|
const rows = [
|
|
{ label: 'Project', value: asset.expand?.project?.name ?? 'Unassigned', mono: false },
|
|
{ label: 'QR style', value: isBrandedQr(asset) ? 'Branded · client logo' : 'Standard', mono: false },
|
|
{ label: 'Model file', value: getModelFileName(asset), mono: true },
|
|
];
|
|
|
|
return (
|
|
<dl className='flex flex-col'>
|
|
{rows.map((row) => (
|
|
<div key={row.label} className='flex justify-between gap-3 border-t border-border-divider py-[11px]'>
|
|
<Text as='dt' tone='muted'>{row.label}</Text>
|
|
<Text as='dd' variant={row.mono ? 'mono' : 'body'} tone='emphasis' truncate className='min-w-0 text-right'>
|
|
{row.value}
|
|
</Text>
|
|
</div>
|
|
))}
|
|
</dl>
|
|
);
|
|
}
|