mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 13:19:09 +03:00
forward refs on badge to fix asChild use and alignment
This commit is contained in:
1 parent
99b136424d
commit
eda636a36b
2 files changed
+13
-10
No files matched your search
@@ -148,7 +148,7 @@ const InfrastructureInfo = () => {
|
||||
actions={[
|
||||
isVisibleReleaseChannel && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<TooltipTrigger asChild>
|
||||
<Badge variant="warning" className="mr-1">
|
||||
{isVisibleReleaseChannel}
|
||||
</Badge>
|
||||
@@ -161,7 +161,7 @@ const InfrastructureInfo = () => {
|
||||
),
|
||||
isOrioleDb && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<TooltipTrigger asChild>
|
||||
<Badge variant="default" className="mr-1">
|
||||
OrioleDB
|
||||
</Badge>
|
||||
@@ -173,7 +173,7 @@ const InfrastructureInfo = () => {
|
||||
),
|
||||
isOnLatestVersion && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<TooltipTrigger asChild>
|
||||
<Badge variant="success" className="mr-1">
|
||||
Latest
|
||||
</Badge>
|
||||
|
||||
@@ -28,12 +28,15 @@ export interface BadgeProps
|
||||
extends React.HTMLAttributes<HTMLDivElement>,
|
||||
VariantProps<typeof badgeVariants> {}
|
||||
|
||||
function Badge({ className, variant = 'default', children, ...props }: BadgeProps) {
|
||||
return (
|
||||
<div className={cn(badgeVariants({ variant }), className)} {...props}>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(
|
||||
({ className, variant = 'default', children, ...props }, ref) => {
|
||||
return (
|
||||
<div ref={ref} className={cn(badgeVariants({ variant }), className)} {...props}>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)
|
||||
Badge.displayName = 'Badge'
|
||||
|
||||
export { Badge }
|
||||
Reference in new issue
Block a user