Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(ui): anchor radio group bubble inputs to their group (#49494)

Ali Waseem310b29c37b38
diff --git a/packages/ui/src/components/radio-group-card.tsx b/packages/ui/src/components/radio-group-card.tsx
index 61060593599..b51a2a5667b 100644
--- a/packages/ui/src/components/radio-group-card.tsx
+++ b/packages/ui/src/components/radio-group-card.tsx
@@ -10,7 +10,13 @@ const RadioGroupCard = React.forwardRef<
React.ElementRef<typeof RadioGroupPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
>(({ className, ...props }, ref) => {
- return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />
+ return (
+ <RadioGroupPrimitive.Root
+ className={cn('relative grid gap-2', className)}
+ {...props}
+ ref={ref}
+ />
+ )
})
RadioGroupCard.displayName = RadioGroupPrimitive.Root.displayName
diff --git a/packages/ui/src/components/radio-group-stacked.tsx b/packages/ui/src/components/radio-group-stacked.tsx
index c3b4dddf9b1..12b0da4d11d 100644
--- a/packages/ui/src/components/radio-group-stacked.tsx
+++ b/packages/ui/src/components/radio-group-stacked.tsx
@@ -13,7 +13,7 @@ const RadioGroupStacked = React.forwardRef<
>(({ className, ...props }, ref) => {
return (
<RadioGroupPrimitive.Root
- className={cn('flex flex-col -space-y-px w-full', className)}
+ className={cn('relative flex flex-col -space-y-px w-full', className)}
{...props}
ref={ref}
/>
diff --git a/packages/ui/src/components/shadcn/ui/radio-group.tsx b/packages/ui/src/components/shadcn/ui/radio-group.tsx
index e7f7ed2b952..8924e0449f6 100644
--- a/packages/ui/src/components/shadcn/ui/radio-group.tsx
+++ b/packages/ui/src/components/shadcn/ui/radio-group.tsx
@@ -10,7 +10,13 @@ const RadioGroup = React.forwardRef<
React.ElementRef<typeof RadioGroupPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
>(({ className, ...props }, ref) => {
- return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />
+ return (
+ <RadioGroupPrimitive.Root
+ className={cn('relative grid gap-2', className)}
+ {...props}
+ ref={ref}
+ />
+ )
})
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName