From eda636a36b0b02247201d6de7d68e10beec0a5ff Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Wed, 3 Dec 2025 16:55:29 +1100 Subject: [PATCH] forward refs on badge to fix asChild use and alignment --- .../Infrastructure/InfrastructureInfo.tsx | 6 +++--- packages/ui/src/components/shadcn/ui/badge.tsx | 17 ++++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureInfo.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureInfo.tsx index 0d4f9155883..ead9c719b37 100644 --- a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureInfo.tsx +++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureInfo.tsx @@ -148,7 +148,7 @@ const InfrastructureInfo = () => { actions={[ isVisibleReleaseChannel && ( - + {isVisibleReleaseChannel} @@ -161,7 +161,7 @@ const InfrastructureInfo = () => { ), isOrioleDb && ( - + OrioleDB @@ -173,7 +173,7 @@ const InfrastructureInfo = () => { ), isOnLatestVersion && ( - + Latest diff --git a/packages/ui/src/components/shadcn/ui/badge.tsx b/packages/ui/src/components/shadcn/ui/badge.tsx index b304a7b9e10..d51414e68cf 100644 --- a/packages/ui/src/components/shadcn/ui/badge.tsx +++ b/packages/ui/src/components/shadcn/ui/badge.tsx @@ -28,12 +28,15 @@ export interface BadgeProps extends React.HTMLAttributes, VariantProps {} -function Badge({ className, variant = 'default', children, ...props }: BadgeProps) { - return ( -
- {children} -
- ) -} +const Badge = React.forwardRef( + ({ className, variant = 'default', children, ...props }, ref) => { + return ( +
+ {children} +
+ ) + } +) +Badge.displayName = 'Badge' export { Badge }