import type { ReactNode } from 'react'; import { Link } from 'react-router'; import { styles } from './styles'; import { gridColsClass } from './utils'; export interface TileProps { /** URL to navigate to when the tile is clicked. */ href: string; title?: ReactNode; description?: ReactNode; /** Preview content, typically light/dark image variants. */ children: ReactNode; target?: '_self' | '_blank'; } export function Tile({ href, title, description, children, target }: TileProps) { const external = /^https?:\/\//i.test(href); const resolvedTarget = target ?? (external ? '_blank' : undefined); const content = ( <>