chore: update Button component

This commit is contained in:
ValdiANS
2025-09-30 15:43:04 +07:00
parent e052166b3a
commit 8e23a805a9
+5 -3
View File
@@ -1,4 +1,4 @@
import react, { JSX } from 'react';
import react from 'react';
import Link from 'next/link';
@@ -17,11 +17,12 @@ const Button = ({
type,
href,
variant,
color,
color = 'primary',
isLoading,
className,
disabled,
onClick,
...props
}: ButtonProps) => {
const btnBaseClassName = cn(
'btn',
@@ -49,6 +50,7 @@ const Button = ({
<>
{!href && (
<button
{...props}
type={type}
onClick={onClick}
disabled={disabled}
@@ -59,7 +61,7 @@ const Button = ({
)}
>
{!isLoading && children}
{isLoading && <span className='loading loading-dots loading-md' />}
{isLoading && <span className='loading loading-dots loading-xl' />}
</button>
)}