import { backgroundColors, textColors, borders, paddings, } from "../consts/buttonStyles"; import { ButtonType } from "../types/button"; interface ButtonProps { buttonType?: ButtonType; icon?: React.ReactNode; text?: string; className?: string; onClick?: ( event: React.MouseEvent ) => void | (() => void); disabled?: boolean; isCircleRounded?: boolean; type?: "button" | "submit" | "reset"; iconPos?: "right" | "left"; } const Button = ({ className, icon, text, buttonType = "primary", disabled = false, onClick, type = "button", iconPos = "left", isCircleRounded = false, }: ButtonProps) => { const backgroundColor = backgroundColors[buttonType]; const textColor = textColors[buttonType]; const border = borders[buttonType]; const padding = paddings[buttonType]; const rounded = isCircleRounded ? "rounded-full" : "rounded-lg"; const disabledStyle = disabled ? "bg-[#0D192214] text-gray-400" : ""; return ( ); }; export default Button;