fix maximum update

This commit is contained in:
hamid zarghami
2025-09-27 09:13:04 +03:30
parent 475a881f2f
commit 834e575d17
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ type Props = {
XOR<{ children: ReactNode }, { label: string }>;
const Button: FC<Props> = memo((props) => {
const { variant = 'primary', size = 'md', className, ...restProps } = props;
const { variant = 'primary', size = 'md', className, isLoading, ...restProps } = props;
const buttonClass = clx(
'flex rounded-xl items-center justify-center text-center font-medium transition-colors',
@@ -33,12 +33,12 @@ const Button: FC<Props> = memo((props) => {
return (
<button
disabled={restProps.isLoading}
disabled={isLoading}
{...restProps}
className={clx(buttonClass, className)}
>
{
restProps.isLoading ?
isLoading ?
<MoonLoader color={variant === 'primary' || variant === 'danger' ? "white" : "#6B7280"} size={16} />
:
restProps.label || restProps.children