mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-07-10 03:46:01 +00:00
34 lines
715 B
TypeScript
34 lines
715 B
TypeScript
"use client";
|
|
|
|
import { RiArrowLeftSLine, RiArrowRightSLine } from "@remixicon/react";
|
|
import { Button } from "@/shared/components/ui/button";
|
|
|
|
interface NavigationButtonProps {
|
|
direction: "left" | "right";
|
|
disabled?: boolean;
|
|
onClick: () => void;
|
|
}
|
|
|
|
export default function NavigationButton({
|
|
direction,
|
|
disabled,
|
|
onClick,
|
|
}: NavigationButtonProps) {
|
|
const Icon = direction === "left" ? RiArrowLeftSLine : RiArrowRightSLine;
|
|
|
|
return (
|
|
<Button
|
|
type="button"
|
|
variant="ghost"
|
|
size="icon-sm"
|
|
onClick={onClick}
|
|
disabled={disabled}
|
|
aria-label={`Navegar para o mês ${
|
|
direction === "left" ? "anterior" : "seguinte"
|
|
}`}
|
|
>
|
|
<Icon className="size-5 text-primary" />
|
|
</Button>
|
|
);
|
|
}
|