xonecas.io
523
Tc

the-champs-timer / files

the-champs-timer / src / components / molecules / buttons.tsx

639 bytes
1import React from "react";
2
3type ButtonProps = {
4  children: React.ReactNode;
5  onClick?: () => void;
6  disabled?: boolean;
7  className?: string;
8  type?: "button" | "submit" | "reset";
9};
10
11const Button: React.FC<ButtonProps> = ({
12  children,
13  onClick,
14  disabled = false,
15  className = "",
16  type = "button",
17}) => {
18  return (
19    <button
20      type={type}
21      onClick={onClick}
22      disabled={disabled}
23      className={`flex items-center justify-center px-4 py-2 rounded font-medium transition-colors border border-slate-400 dark:border-slate-600 ${className}`}
24    >
25      {children}
26    </button>
27  );
28};
29
30export default Button;