Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
💄 Replace icon with spinner on loading icon buttons (#2810)
Luke Vella0a514a523ed8
diff --git a/apps/web/src/features/poll/components/notification-toggle.tsx b/apps/web/src/features/poll/components/notification-toggle.tsxindex 7aa16c2e8..d8f1ecd28 100644--- a/apps/web/src/features/poll/components/notification-toggle.tsx+++ b/apps/web/src/features/poll/components/notification-toggle.tsx@@ -66,6 +66,7 @@ export function NotificationToggle() {render={<Buttonvariant="ghost"+ size="icon"aria-pressed={poll.muted}aria-label={poll.muteddiff --git a/packages/ui/src/button.tsx b/packages/ui/src/button.tsxindex 198193ad5..3fc044555 100644--- a/packages/ui/src/button.tsx+++ b/packages/ui/src/button.tsx@@ -24,6 +24,7 @@ const Button = ({...props}: ButtonPrimitive.Props &VariantProps<typeof buttonVariants> & { loading?: boolean }) => {+ const isIconButton = size?.startsWith("icon");return (<ButtonPrimitiveclassName={cn(@@ -31,6 +32,7 @@ const Button = ({buttonVariants({ variant, size }),{"pointer-events-none": loading,+ "[&_svg:not([data-slot=spinner])]:hidden": loading && isIconButton,},className,)}@@ -38,7 +40,8 @@ const Button = ({>{loading ? (<Loader2Icon- data-icon="inline-start"+ data-slot="spinner"+ data-icon={isIconButton ? undefined : "inline-start"}className="size-4 animate-spin opacity-75"/>) : null}