File size: 535 Bytes
05c5ed5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"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>
  );
}