mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-07-12 23:13:48 +00:00
27 lines
650 B
TypeScript
27 lines
650 B
TypeScript
import Link from "next/link";
|
|
import { cn } from "@/lib/utils";
|
|
import { useTranslations } from "next-intl";
|
|
import { ArrowLeftIcon } from "lucide-react";
|
|
import { TooltipButton } from "@/components/tooltip-button";
|
|
|
|
interface BackButtonProps {
|
|
href: string;
|
|
className?: string;
|
|
}
|
|
|
|
export const BackButton = ({ href, className }: BackButtonProps) => {
|
|
const t = useTranslations();
|
|
|
|
return (
|
|
<TooltipButton
|
|
tooltipContent={t("BackButton")}
|
|
className={cn("h-8 w-auto p-2", className)}
|
|
asChild
|
|
>
|
|
<Link href={href}>
|
|
<ArrowLeftIcon size={16} aria-hidden="true" />
|
|
</Link>
|
|
</TooltipButton>
|
|
);
|
|
};
|