Fix bug pull request #28

Merged
TakahashiNguyen merged 13 commits from develop into main 2026-04-06 14:09:48 +00:00
3 changed files with 1 additions and 43 deletions
Showing only changes of commit 949badaeeb - Show all commits
-41
View File
@@ -1,41 +0,0 @@
"use client";
import type { ButtonProps } from "./Button.types";
export default function IconButton({
variant = "primary",
size = "md",
icon,
disabled = false,
className = "",
children,
...props
}: ButtonProps) {
const baseStyles =
"font-semibold rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center";
const variants = {
primary:
"bg-(--color-primary) text-white hover:bg-(--color-primary-dark) active:scale-95",
secondary:
"border border-(--color-border) hover:bg-(--color-border-light) active:scale-95",
danger: "bg-red-500 text-white hover:bg-red-600 active:scale-95",
ghost: "bg-transparent hover:bg-(--color-border-light) active:scale-95",
};
const sizes = {
sm: "h-8 w-8 text-sm",
md: "h-10 w-10 text-base",
lg: "h-12 w-12 text-lg",
};
return (
<button
className={`${baseStyles} ${variants[variant]} ${sizes[size]} ${className}`}
disabled={disabled}
{...props}
>
{icon ? <i className={`fa-solid ${icon}`}></i> : children}
</button>
);
}
-1
View File
@@ -1,3 +1,2 @@
export { default as Button } from "./Button";
export { default as IconButton } from "./IconButton";
export type { ButtonProps } from "./Button.types";
+1 -1
View File
@@ -1,5 +1,5 @@
// Buttons
export { Button, IconButton } from "./buttons";
export { Button } from "./buttons";
export type { ButtonProps } from "./buttons";
// Inputs