start
This commit is contained in:
14
frontend/src/components/ObjectCard.tsx
Normal file
14
frontend/src/components/ObjectCard.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Link } from 'react-router'
|
||||
import type { ObjectSummary } from '../api/types'
|
||||
|
||||
export function ObjectCard({ object, linkBase = '/objects' }: { object: ObjectSummary; linkBase?: string }) {
|
||||
return (
|
||||
<Link
|
||||
to={`${linkBase}/${object.id}`}
|
||||
className="flex flex-col gap-1 rounded-lg border border-slate-200 p-3 transition hover:border-slate-400 dark:border-slate-800 dark:hover:border-slate-600"
|
||||
>
|
||||
<span className="font-medium text-slate-900 dark:text-slate-100">{object.name}</span>
|
||||
<span className="text-sm text-slate-500 dark:text-slate-400">{object.inventory_number}</span>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user