Openstatus
www.openstatus.dev
1"use client";
2
3import { Button } from "@/components/ui/button";
4import { cn } from "@/lib/utils";
5import { ArrowLeft } from "lucide-react";
6import Link from "next/link";
7
8export function ButtonBack({
9 className,
10 href = "/",
11 ...props
12}: React.ComponentProps<typeof Button> & { href?: string }) {
13 return (
14 <Button
15 variant="ghost"
16 size="sm"
17 className={cn("text-muted-foreground", className)}
18 asChild
19 {...props}
20 >
21 <Link href={href}>
22 <ArrowLeft />
23 Back
24 </Link>
25 </Button>
26 );
27}