26 lines
636 B
TypeScript
26 lines
636 B
TypeScript
"use client";
|
|
|
|
import {ReactNode} from "react";
|
|
import {Download, ImageIcon, Upload} from "lucide-react";
|
|
import {Button} from "@/components/ui/button";
|
|
|
|
export function FilePendingButton({
|
|
children,
|
|
icon = "download",
|
|
disabled = true,
|
|
onClick,
|
|
}: {
|
|
children: ReactNode;
|
|
icon?: "download" | "upload" | "image";
|
|
disabled?: boolean;
|
|
onClick?: () => void;
|
|
}) {
|
|
const Icon = icon === "upload" ? Upload : icon === "image" ? ImageIcon : Download;
|
|
return (
|
|
<Button type="button" size="xs" variant="outline" disabled={disabled} onClick={onClick}>
|
|
<Icon className="h-3 w-3" />
|
|
{children}
|
|
</Button>
|
|
);
|
|
}
|