"use client";
import { ButtonHTMLAttributes, ReactNode } from "react";
import clsx from "clsx";
import { Play, Square, Loader2 } from "lucide-react";
import styles from "@/styles/Button.module.css";
const iconMap = {
play: Play,
stop: Square,
loading: Loader2,
};
function getIcon(iconName: string) {
return iconMap[iconName as keyof typeof iconMap];
}
interface ButtonProps
extends Omit, "type"> {
variant?:
| "primary"
| "success"
| "danger"
| "warning"
| "info"
| "light"
| "dark";
iconLeft?: string;
iconRight?: string;
loading?: boolean;
children: ReactNode;
tooltip?: string;
type?: "submit" | "reset" | "button";
}
export function Button({
variant = "primary",
iconLeft,
iconRight,
loading = false,
children,
className,
disabled,
tooltip,
type = "button",
...props
}: ButtonProps) {
return (
);
}