improve utilities workspace navigation

This commit is contained in:
makearmy 2026-07-10 17:25:34 -04:00
parent 0855724cb0
commit 305ea41ad3
5 changed files with 71 additions and 37 deletions

View file

@ -1,4 +1,3 @@
import Link from "next/link";
import { cn } from "@/lib/utils";
type ToolShellProps = {
@ -19,31 +18,23 @@ export default function ToolShell({
subtitle,
className,
children,
backHref = "/laser-toolkit",
backLabel = "Back to Toolkit",
}: ToolShellProps) {
const desc = description ?? subtitle;
return (
<div className={cn("mx-auto w-full max-w-5xl px-4 py-6", className)}>
<div className="mb-6 flex items-start justify-between gap-4">
<div className={cn("w-full p-4 sm:p-5", className)}>
<div className="mb-4 flex items-start justify-between gap-4 border-b border-border/50 pb-4">
<div>
<h1 className="text-2xl font-semibold tracking-tight">{title}</h1>
<div className="mb-1 text-[10px] uppercase tracking-[0.18em] text-accent">laser.calc</div>
<h1 className="text-xl font-semibold tracking-tight">{title}</h1>
{desc ? (
<p className="mt-1 text-sm text-muted-foreground">{desc}</p>
) : null}
</div>
<Link
href={backHref}
className="inline-flex h-9 items-center rounded-md border border-input bg-background px-3 text-sm shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground"
>
{backLabel}
</Link>
</div>
{children}
</div>
);
}