forked from rajun/ar-test
feat: add asset detail list
This commit is contained in:
parent
3442ed452e
commit
46248e2816
24
app/components/assets/detail/asset-detail-list.tsx
Normal file
24
app/components/assets/detail/asset-detail-list.tsx
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user