Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | import { ArrowLeft, X } from "lucide-react";
import { Button } from "@/ahuora-design-system/ui/button";
export function SourceReturnBanner({
returnLabel,
onReturn,
onDismiss,
}: {
returnLabel: string;
onReturn: () => void;
onDismiss: () => void;
}) {
return (
<div
className="sticky top-0 z-20 -mx-5 mb-4 flex items-center justify-between gap-2 border-y bg-card/95 px-5 py-2 shadow-sm backdrop-blur"
aria-label="Economics source navigation"
>
<Button
type="button"
size="sm"
variant="outline"
className="h-8 gap-1.5 px-2.5 text-xs"
onClick={onReturn}
>
<ArrowLeft className="size-3.5" aria-hidden="true" />
Back to {returnLabel}
</Button>
<Button
type="button"
size="sm"
variant="ghost"
className="h-8 w-8 p-0 text-muted-foreground"
aria-label="Dismiss source navigation"
title="Dismiss source navigation"
onClick={onDismiss}
>
<X className="size-4" aria-hidden="true" />
</Button>
</div>
);
}
|