Files
HiveGrid-Wireframes/hivegrid-cloud/apps/web/app/components/ui/buttons/BackButtonWithTitle.tsx
T

27 lines
672 B
TypeScript

import { Button } from "../button";
import { cn } from "~/lib/utils";
import { t as i18nT } from "i18next";
export default function BackButtonWithTitle({
href,
children,
className,
size = "xs",
}: {
href: string;
children: React.ReactNode;
className?: string;
size?: "default" | "sm" | "xs" | "sm" | "lg";
}) {
return (
<div className={cn("flex items-center space-x-2 truncate", className)}>
<Button size={size} variant="outline" asChild className="truncate font-normal">
<a href={href} aria-label={i18nT("shared.back")}>
&larr;
</a>
</Button>
<div className="truncate">{children}</div>
</div>
);
}