"use client"; import { Route } from "@/routers/types"; import Link from "next/link"; import React, { ButtonHTMLAttributes, FC } from "react"; export interface ButtonProps { className?: string; translate?: string; sizeClass?: string; fontSize?: string; // loading?: boolean; disabled?: boolean; type?: ButtonHTMLAttributes["type"]; href?: Route; targetBlank?: boolean; onClick?: () => void; children?: React.ReactNode; } const Button: FC = ({ className = "text-neutral-700 dark:text-neutral-200", translate = "", sizeClass = "px-4 py-3 sm:px-6", fontSize = "text-sm sm:text-base font-medium", disabled = false, href, children, targetBlank, type, loading, onClick = () => {}, }) => { const CLASSES = `nc-Button relative h-auto inline-flex items-center justify-center rounded-full transition-colors ${fontSize} ${sizeClass} ${translate} ${className} `; const _renderLoading = () => { return ( ); }; if (!!href) { return ( {children || `This is Link`} ); } return ( ); }; export default Button;