Something went wrong. Try again.
link aggregator for FIRST Tech Challenge tools & resources firsttech.tools
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253import type { Tool } from "../lib/schema.ts";import { FaSolidExternalLink } from 'solid-icons/fa'
interface Props { tool: Tool;}
export default function ToolCard(props: Props) { const { tool } = props;
return ( <div class="rounded-md border border-border bg-card text-card-foreground shadow-sm p-3.5 flex flex-col gap-2"> <div class="flex items-start justify-between gap-2"> <h2 class="text-sm font-semibold leading-snug">{tool.name}</h2> {tool.official && ( <span class="shrink-0 inline-flex items-center rounded-full border border-transparent bg-primary text-primary-foreground text-[10px] font-medium px-2 py-0.5"> FIRST Official </span> )} </div>
{tool.author && ( <p class="text-[11px] text-muted-foreground">By {tool.author}</p> )}
<p class="text-xs text-muted-foreground flex-1 leading-relaxed">{tool.description}</p>
<div class="flex gap-1.5 flex-wrap mt-auto pt-0.5"> <a href={tool.url} target="_blank" rel="noopener noreferrer" class="inline-flex items-center rounded bg-primary text-primary-foreground text-xs font-medium px-2.5 py-1 hover:bg-primary/90 transition-colors" > <FaSolidExternalLink class="mx-1"/> Visit </a> {tool.source && ( <a href={tool.source} target="_blank" rel="noopener noreferrer" class="inline-flex items-center rounded border border-border bg-background text-foreground text-xs font-medium px-2.5 py-1 hover:bg-accent transition-colors" > Source </a> )} </div> </div> );}