better-chatbot / src /components /layouts /back-button.tsx
Bot
Initial commit for HF Spaces
05c5ed5
Raw
History Blame Contribute Delete
535 Bytes
"use client";
import { Button } from "ui/button";
import { ArrowLeft } from "lucide-react";
import Link from "next/link";
interface BackButtonProps extends React.HTMLAttributes<HTMLAnchorElement> {
returnUrl: string;
title: string;
}
export function BackButton({ returnUrl, title, ...props }: BackButtonProps) {
return (
<Link href={returnUrl} {...props}>
<Button variant="ghost" size="sm" className="hover:bg-muted">
<ArrowLeft className="mr-2 h-4 w-4" />
{title}
</Button>
</Link>
);
}