chore(release): snapshot 1.4.2

This commit is contained in:
Erik Silva
2025-12-17 13:36:23 -03:00
parent 2a112f169d
commit 99d828869a
95 changed files with 9933 additions and 1601 deletions

View File

@@ -1,13 +1,13 @@
"use client";
import { ButtonHTMLAttributes, forwardRef } from "react";
import { ButtonHTMLAttributes, forwardRef, ReactNode } from "react";
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
variant?: "primary" | "secondary" | "outline" | "ghost";
size?: "sm" | "md" | "lg";
isLoading?: boolean;
leftIcon?: string;
rightIcon?: string;
leftIcon?: string | ReactNode;
rightIcon?: string | ReactNode;
}
const Button = forwardRef<HTMLButtonElement, ButtonProps>(
@@ -55,11 +55,19 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
<i className="ri-loader-4-line animate-spin mr-2 text-[20px]" />
)}
{!isLoading && leftIcon && (
<i className={`${leftIcon} mr-2 text-[20px]`} />
typeof leftIcon === 'string' ? (
<i className={`${leftIcon} mr-2 text-[20px]`} />
) : (
<div className="w-5 h-5 mr-2">{leftIcon}</div>
)
)}
{children}
{!isLoading && rightIcon && (
<i className={`${rightIcon} ml-2 text-[20px]`} />
typeof rightIcon === 'string' ? (
<i className={`${rightIcon} ml-2 text-[20px]`} />
) : (
<div className="w-5 h-5 ml-2">{rightIcon}</div>
)
)}
</button>
);