2026-07-09 21:07:34 -04:00
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
|
|
|
|
|
type ToolShellProps = {
|
|
|
|
|
title: string;
|
|
|
|
|
/** Preferred prop */
|
|
|
|
|
description?: string;
|
|
|
|
|
/** Back-compat alias used by some pages */
|
|
|
|
|
subtitle?: string;
|
|
|
|
|
className?: string;
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
backHref?: string;
|
|
|
|
|
backLabel?: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default function ToolShell({
|
|
|
|
|
title,
|
|
|
|
|
description,
|
|
|
|
|
subtitle,
|
|
|
|
|
className,
|
|
|
|
|
children,
|
|
|
|
|
}: ToolShellProps) {
|
|
|
|
|
const desc = description ?? subtitle;
|
|
|
|
|
|
|
|
|
|
return (
|
2026-07-10 17:25:34 -04:00
|
|
|
<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">
|
2026-07-09 21:07:34 -04:00
|
|
|
<div>
|
2026-07-10 17:25:34 -04:00
|
|
|
<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>
|
2026-07-09 21:07:34 -04:00
|
|
|
{desc ? (
|
|
|
|
|
<p className="mt-1 text-sm text-muted-foreground">{desc}</p>
|
|
|
|
|
) : null}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|