BackLink: ArrowLeft (14px) + caption-md text-graphite hover:text-primary, instant. Replaces inline Link patterns in EngagementDetailPage (already committed), SimulationFormPage, and TemplateFormPage. Also migrates SimulationFormPage Done/SOC banners to AlertBanner. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
460 B
TypeScript
18 lines
460 B
TypeScript
import { Link } from 'react-router-dom';
|
|
import { ArrowLeft } from 'lucide-react';
|
|
import type { ReactNode } from 'react';
|
|
|
|
interface BackLinkProps {
|
|
to: string;
|
|
children: ReactNode;
|
|
}
|
|
|
|
export function BackLink({ to, children }: BackLinkProps): JSX.Element {
|
|
return (
|
|
<Link to={to} className="inline-flex items-center gap-xxs caption-md text-graphite hover:text-primary">
|
|
<ArrowLeft size={14} aria-hidden />
|
|
{children}
|
|
</Link>
|
|
);
|
|
}
|