fix: loading on small buttons (#2764)

* Formatting

* Fixed loading on buttons that are small

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
Lucas Oliveira 2024-07-17 17:18:52 -03:00 committed by GitHub
commit 785771acef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2710 additions and 2710 deletions

File diff suppressed because one or more lines are too long

View file

@ -86,12 +86,12 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
{...props}
>
{loading ? (
<span className="relative">
<span className="relative flex items-center justify-center">
<span className="invisible">{newChildren}</span>
<span className="absolute inset-0">
<span className="absolute inset-0 flex items-center justify-center">
<ForwardedIconComponent
name={"Loader2"}
className={"m-auto h-full animate-spin"}
className={"h-full w-full animate-spin"}
/>
</span>
</span>