🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(ui): centre badge label in both badge primitives (#18982)
Der Gerät9af461c1fcd9
diff --git a/web/src/components/design-system/Badge/Badge.tsx b/web/src/components/design-system/Badge/Badge.tsxindex ff0b850067..0e4ca87b5b 100644--- a/web/src/components/design-system/Badge/Badge.tsx+++ b/web/src/components/design-system/Badge/Badge.tsx@@ -7,7 +7,7 @@ import { type ComponentPropsWithoutRef } from "react";import { cn } from "@/src/utils/tailwind";const badgeVariants = cva(- "inline-flex w-fit max-w-full min-w-0 shrink-0 items-center rounded-sm border pb-px text-xs leading-none font-normal",+ "inline-flex w-fit max-w-full min-w-0 shrink-0 items-center rounded-sm border text-xs leading-none font-normal",{variants: {size: {diff --git a/web/src/components/design-system/Tag/Tag.tsx b/web/src/components/design-system/Tag/Tag.tsxindex faba0851cb..d9be2e5d5e 100644--- a/web/src/components/design-system/Tag/Tag.tsx+++ b/web/src/components/design-system/Tag/Tag.tsx@@ -5,7 +5,7 @@ import { type IconComponent, X } from "@langfuse/icons";import { type ComponentPropsWithoutRef } from "react";const tagVariants = cva(- "inline-flex h-5 w-fit max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border px-1.5 pb-px font-mono text-xs leading-none font-normal",+ "inline-flex h-5 w-fit max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border px-1.5 font-mono text-xs leading-none font-normal",{variants: {status: {diff --git a/web/src/components/ui/Badge.stories.tsx b/web/src/components/ui/Badge.stories.tsxnew file mode 100644index 0000000000..e0b79932eb--- /dev/null+++ b/web/src/components/ui/Badge.stories.tsx@@ -0,0 +1,11 @@+import preview from "../../../.storybook/preview";+import { Badge } from "./badge";++const meta = preview.meta({+ component: Badge,+ args: {+ children: "Badge",+ },+});++export const Default = meta.story({});diff --git a/web/src/components/ui/badge.tsx b/web/src/components/ui/badge.tsxindex 45de02c3c6..ea6f63d18f 100644--- a/web/src/components/ui/badge.tsx+++ b/web/src/components/ui/badge.tsx@@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority";import { cn } from "@/src/utils/tailwind";const badgeVariants = cva(- "inline-flex h-5.5 items-center gap-1.5 rounded-sm border pr-1.5 pb-px pl-2 text-xs leading-none font-normal transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",+ "inline-flex h-5.5 items-center gap-1.5 rounded-sm border pr-1.5 pl-2 text-xs leading-none font-normal transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants: {variant: {