mirror of
https://github.com/block/buzz.git
synced 2026-12-01 05:32:24 +00:00
34 lines
621 B
TypeScript
34 lines
621 B
TypeScript
import { Plus } from "lucide-react";
|
|
|
|
import { Button } from "@/shared/ui/button";
|
|
|
|
type CreateNewButtonProps = {
|
|
ariaLabel?: string;
|
|
disabled?: boolean;
|
|
label?: string;
|
|
onClick: () => void;
|
|
variant?: "default" | "outline";
|
|
};
|
|
|
|
export function CreateNewButton({
|
|
ariaLabel,
|
|
disabled = false,
|
|
label = "New",
|
|
onClick,
|
|
variant = "default",
|
|
}: CreateNewButtonProps) {
|
|
return (
|
|
<Button
|
|
aria-label={ariaLabel}
|
|
disabled={disabled}
|
|
onClick={onClick}
|
|
size="sm"
|
|
type="button"
|
|
variant={variant}
|
|
>
|
|
<Plus className="h-4 w-4" />
|
|
{label}
|
|
</Button>
|
|
);
|
|
}
|