feat(ui): add DeviceLink reusable component

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-18 11:11:25 -05:00
parent 8d8779951c
commit c3bbdb852d

View File

@@ -0,0 +1,21 @@
import { Link } from '@tanstack/react-router'
import { cn } from '@/lib/utils'
interface DeviceLinkProps {
tenantId: string
deviceId: string
children: React.ReactNode
className?: string
}
export function DeviceLink({ tenantId, deviceId, children, className }: DeviceLinkProps) {
return (
<Link
to="/tenants/$tenantId/devices/$deviceId"
params={{ tenantId, deviceId }}
className={cn('hover:text-text-primary hover:underline', className)}
>
{children}
</Link>
)
}