|
|
@ -153,15 +153,7 @@ export function Button({ |
|
|
); |
|
|
); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const button = ( |
|
|
|
|
|
<button |
|
|
|
|
|
{...props} |
|
|
|
|
|
type={type} |
|
|
|
|
|
disabled={isDisabled} |
|
|
|
|
|
aria-describedby={description && !isOutlined ? countdownId : undefined} |
|
|
|
|
|
className={baseClassName} |
|
|
|
|
|
> |
|
|
|
|
|
{isLoading ? ( |
|
|
|
|
|
|
|
|
const content = isLoading ? ( |
|
|
<LoadingThreeDot /> |
|
|
<LoadingThreeDot /> |
|
|
) : ( |
|
|
) : ( |
|
|
<span className="flex w-full items-center justify-center gap-2"> |
|
|
<span className="flex w-full items-center justify-center gap-2"> |
|
|
@ -187,14 +179,30 @@ export function Button({ |
|
|
renderArrow("right") |
|
|
renderArrow("right") |
|
|
)} |
|
|
)} |
|
|
</span> |
|
|
</span> |
|
|
)} |
|
|
|
|
|
</button> |
|
|
|
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
return href ? ( |
|
|
|
|
|
<Link href={localizePath(href, locale)}>{button}</Link> |
|
|
|
|
|
) : ( |
|
|
|
|
|
button |
|
|
|
|
|
|
|
|
if (href) { |
|
|
|
|
|
return ( |
|
|
|
|
|
<Link |
|
|
|
|
|
href={localizePath(href, locale)} |
|
|
|
|
|
aria-disabled={isDisabled} |
|
|
|
|
|
className={`${baseClassName} ${isDisabled ? "pointer-events-none" : ""}`} |
|
|
|
|
|
> |
|
|
|
|
|
{content} |
|
|
|
|
|
</Link> |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
<button |
|
|
|
|
|
{...props} |
|
|
|
|
|
type={type} |
|
|
|
|
|
disabled={isDisabled} |
|
|
|
|
|
aria-describedby={description && !isOutlined ? countdownId : undefined} |
|
|
|
|
|
className={baseClassName} |
|
|
|
|
|
> |
|
|
|
|
|
{content} |
|
|
|
|
|
</button> |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|