Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

refactor(web): Use design system buttons in design system components (#17622)

Ben Bachemd6e818bd18b4
diff --git a/web/src/components/design-system/Button/Button.stories.tsx b/web/src/components/design-system/Button/Button.stories.tsx
index 0a025550c4..a3ee5d3f67 100644
--- a/web/src/components/design-system/Button/Button.stories.tsx
+++ b/web/src/components/design-system/Button/Button.stories.tsx
@@ -1,3 +1,4 @@
+import { BookOpen } from "lucide-react";
import { expect, fn, userEvent, within } from "storybook/test";
import preview from "../../../../.storybook/preview";
@@ -50,6 +51,7 @@ export const SecondaryLink = meta.story({
name: "(Test) Secondary Link",
args: {
href: "/docs",
+ icon: BookOpen,
text: "View docs",
variant: "secondary",
},
diff --git a/web/src/components/design-system/Button/Button.tsx b/web/src/components/design-system/Button/Button.tsx
index 896b2a74b8..c68bcda89d 100644
--- a/web/src/components/design-system/Button/Button.tsx
+++ b/web/src/components/design-system/Button/Button.tsx
@@ -1,18 +1,20 @@
import { cva } from "class-variance-authority";
-import { ExternalLink } from "lucide-react";
+import { ExternalLink, type LucideIcon } from "lucide-react";
import Link from "next/link";
-import { type Ref } from "react";
+import { type MouseEventHandler, type Ref } from "react";
import { Spinner } from "@/src/components/design-system/Spinner/Spinner";
const buttonVariants = cva(
- "inline-flex h-8 items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
+ "inline-flex h-8 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 py-1 text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
{
variants: {
variant: {
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
+ destructive:
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90",
ghost: "hover:bg-accent hover:text-accent-foreground",
},
},
@@ -24,37 +26,35 @@ const buttonVariants = cva(
type ButtonProps = {
text: string;
- variant?: "primary" | "secondary" | "ghost";
+ variant?: "primary" | "secondary" | "destructive" | "ghost";
} & (
| {
href: string;
ref?: Ref<HTMLAnchorElement>;
disabled?: never;
loading?: never;
+ icon?: LucideIcon;
+ form?: never;
onClick?: never;
type?: never;
}
- | ({
+ | {
href?: never;
ref?: Ref<HTMLButtonElement>;
disabled?: boolean;
+ form?: string;
+ icon?: LucideIcon;
loading?: boolean;
- } & (
- | {
- type?: "button";
- onClick: () => void;
- }
- | {
- type: "submit";
- onClick?: never;
- }
- ))
+ onClick?: MouseEventHandler<HTMLButtonElement>;
+ type?: "button" | "submit";
+ }
);
export function Button(props: ButtonProps) {
const className = buttonVariants({ variant: props.variant });
if (props.href !== undefined) {
+ const Icon = props.icon;
const isExternal =
props.href.startsWith("https://") || props.href.startsWith("http://");
@@ -71,6 +71,7 @@ export function Button(props: ButtonProps) {
target="_blank"
rel={isLangfuseDomain ? "noopener" : "noopener noreferrer"}
>
+ {Icon ? <Icon className="size-3.5 shrink-0" aria-hidden /> : null}
{props.text}
<ExternalLink className="size-3" aria-hidden />
</a>
@@ -79,16 +80,20 @@ export function Button(props: ButtonProps) {
return (
<Link className={className} href={props.href} ref={props.ref}>
+ {Icon ? <Icon className="size-3.5 shrink-0" aria-hidden /> : null}
{props.text}
</Link>
);
}
+ const Icon = props.icon;
+
return (
<button
className={className}
ref={props.ref}
type={props.type ?? "button"}
+ form={props.form}
disabled={props.disabled || props.loading}
onClick={props.loading || props.disabled ? undefined : props.onClick}
aria-busy={props.loading}
@@ -99,7 +104,10 @@ export function Button(props: ButtonProps) {
<Spinner size="full" />
</span>
) : (
- props.text
+ <>
+ {Icon ? <Icon className="size-3.5 shrink-0" aria-hidden /> : null}
+ {props.text}
+ </>
)}
</button>
);
diff --git a/web/src/components/design-system/Callout/Callout.stories.tsx b/web/src/components/design-system/Callout/Callout.stories.tsx
index bff4c67ae9..76973d5520 100644
--- a/web/src/components/design-system/Callout/Callout.stories.tsx
+++ b/web/src/components/design-system/Callout/Callout.stories.tsx
@@ -2,7 +2,6 @@ import { Bot } from "lucide-react";
import { expect, fn, userEvent, within } from "storybook/test";
import preview from "../../../../.storybook/preview";
-import { Button } from "../../ui/button";
import { Callout } from "./Callout";
const meta = preview.meta({
@@ -26,7 +25,7 @@ export const Default = meta.story({
variant: "info",
align: "middle",
children: message,
- actions: null,
+ actions: [],
onDismiss: fn(),
},
});
@@ -41,7 +40,7 @@ export const Warning = meta.story({
its ingestion limit.
</span>
),
- actions: null,
+ actions: [],
onDismiss: fn(),
},
});
@@ -51,11 +50,10 @@ export const WithActions = meta.story({
variant: "info",
align: "middle",
children: message,
- actions: (
- <Button size="sm" variant="secondary">
- Learn more
- </Button>
- ),
+ actions: [
+ { type: "button", label: "Learn more", onClick: fn() },
+ { type: "button", label: "Not now", onClick: fn() },
+ ],
onDismiss: fn(),
},
});
@@ -66,7 +64,7 @@ export const Dismisses = meta.story({
variant: "info",
align: "middle",
children: <span>This callout can be dismissed.</span>,
- actions: null,
+ actions: [],
onDismiss: fn(),
},
play: async ({ args, canvasElement }) => {
diff --git a/web/src/components/design-system/Callout/Callout.tsx b/web/src/components/design-system/Callout/Callout.tsx
index 0cd3cb1c58..214fe3f42d 100644
--- a/web/src/components/design-system/Callout/Callout.tsx
+++ b/web/src/components/design-system/Callout/Callout.tsx
@@ -1,10 +1,8 @@
-/* eslint-disable boundaries/dependencies */
"use client";
import { cva } from "class-variance-authority";
-import { X } from "lucide-react";
-
-import { Button } from "@/src/components/ui/button";
+import { type LucideIcon, X } from "lucide-react";
+import Link from "next/link";
const calloutVariants = cva("relative w-full rounded-lg border p-3", {
variants: {
@@ -37,11 +35,28 @@ const descriptionVariants = cva(
},
);
+const actionClasses =
+ "inline-flex h-6 items-center justify-center gap-1.5 rounded-md border border-current bg-transparent px-2.5 text-sm transition-colors hover:bg-black/5 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:hover:bg-white/10";
+
+export type CalloutAction =
+ | {
+ type: "button";
+ label: string;
+ icon?: LucideIcon;
+ onClick: () => void;
+ }
+ | {
+ type: "link";
+ label: string;
+ href: string;
+ onClick?: () => void;
+ };
+
export type CalloutProps = {
variant: "info" | "warning";
align: "top" | "middle";
children: React.ReactElement;
- actions: React.ReactElement | null;
+ actions: ReadonlyArray<CalloutAction>;
onDismiss: () => void;
};
@@ -59,21 +74,65 @@ export function Callout({
className={`${contentVariants({ align })} sm:flex-row sm:justify-between`}
>
<div className="text-foreground min-w-0 text-sm">{children}</div>
- {actions ? (
+ {actions.length > 0 ? (
<div className="flex shrink-0 items-center gap-2 self-end sm:ml-4 sm:self-auto">
- {actions}
+ {actions.map((action) => {
+ if (action.type === "button") {
+ const Icon = action.icon;
+ return (
+ <button
+ className={actionClasses}
+ key={action.label}
+ onClick={action.onClick}
+ type="button"
+ >
+ {Icon ? <Icon className="size-4" aria-hidden /> : null}
+ {action.label}
+ </button>
+ );
+ }
+
+ const isExternal =
+ action.href.startsWith("https://") ||
+ action.href.startsWith("http://");
+
+ if (isExternal) {
+ return (
+ <a
+ className={actionClasses}
+ href={action.href}
+ key={action.label}
+ onClick={action.onClick}
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ {action.label}
+ </a>
+ );
+ }
+
+ return (
+ <Link
+ className={actionClasses}
+ href={action.href}
+ key={action.label}
+ onClick={action.onClick}
+ >
+ {action.label}
+ </Link>
+ );
+ })}
</div>
) : null}
</div>
- <Button
- variant="ghost"
- size="sm"
- onClick={onDismiss}
- className="text-muted-foreground hover:text-foreground h-6 w-6 shrink-0 p-0"
+ <button
aria-label="Dismiss"
+ className="focus-visible:ring-ring inline-flex size-6 shrink-0 items-center justify-center rounded-md bg-transparent transition-colors hover:bg-black/5 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden dark:hover:bg-white/10"
+ onClick={onDismiss}
+ type="button"
>
- <X className="h-4 w-4" />
- </Button>
+ <X className="size-4" aria-hidden />
+ </button>
</div>
</div>
);
diff --git a/web/src/components/design-system/Codeblock/Codeblock.tsx b/web/src/components/design-system/Codeblock/Codeblock.tsx
index d4771afe8a..169b007965 100644
--- a/web/src/components/design-system/Codeblock/Codeblock.tsx
+++ b/web/src/components/design-system/Codeblock/Codeblock.tsx
@@ -1,5 +1,4 @@
-/* eslint-disable boundaries/dependencies */
-import { Button } from "@/src/components/ui/button";
+import { IconButton } from "@/src/components/design-system/IconButton/IconButton";
import { copyTextToClipboard } from "@/src/utils/clipboard";
import { Check, Copy } from "lucide-react";
import { type FC, memo, useState } from "react";
@@ -37,24 +36,13 @@ const CodeBlock: FC<Props> = memo(
};
const copyButton = (
- <Button
- variant="ghost"
+ <IconButton
+ icon={isCopied ? Check : Copy}
+ label="Copy code"
size="xs"
- className={cn(
- "text-xs focus-visible:ring-1 focus-visible:ring-offset-0",
- variant === "read-only"
- ? "text-muted-foreground hover:bg-background/50 absolute top-1.5 right-1.5"
- : "hover:bg-border",
- )}
+ variant={variant === "read-only" ? "ghost" : "subtle"}
onClick={handleCopy}
- >
- {isCopied ? (
- <Check className="h-3 w-3" />
- ) : (
- <Copy className="h-3 w-3" />
- )}
- <span className="sr-only">Copy code</span>
- </Button>
+ />
);
return (
@@ -73,7 +61,9 @@ const CodeBlock: FC<Props> = memo(
<div className="flex items-center py-1">{copyButton}</div>
</div>
) : (
- copyButton
+ <div className="text-muted-foreground absolute top-1.5 right-1.5">
+ {copyButton}
+ </div>
)}
<Highlight
theme={appliedTheme === "dark" ? themes.vsDark : themes.github}
diff --git a/web/src/components/design-system/ConfirmationDialogController/ConfirmationDialogController.stories.tsx b/web/src/components/design-system/ConfirmationDialogController/ConfirmationDialogController.stories.tsx
index 75f4ac58a7..ddc41db045 100644
--- a/web/src/components/design-system/ConfirmationDialogController/ConfirmationDialogController.stories.tsx
+++ b/web/src/components/design-system/ConfirmationDialogController/ConfirmationDialogController.stories.tsx
@@ -1,7 +1,7 @@
import { expect, fn, userEvent, waitFor, within } from "storybook/test";
import preview from "../../../../.storybook/preview";
-import { Button } from "@/src/components/ui/button";
+import { Button } from "@/src/components/design-system/Button/Button";
import { ConfirmationDialogController } from "./ConfirmationDialogController";
@@ -21,7 +21,7 @@ export const StandardExample = meta.story({
variant: "destructive",
onConfirm,
children: ({ openDialog }) => (
- <Button onClick={openDialog}>Archive score config</Button>
+ <Button onClick={openDialog} text="Archive score config" />
),
},
});
@@ -36,7 +36,7 @@ export const TypeToConfirmExample = meta.story({
variant: "destructive",
onConfirm,
children: ({ openDialog }) => (
- <Button onClick={openDialog}>Delete project</Button>
+ <Button onClick={openDialog} text="Delete project" />
),
},
});
@@ -50,7 +50,7 @@ export const Standard = meta.story({
variant: "destructive",
onConfirm,
children: ({ openDialog }) => (
- <Button onClick={openDialog}>Archive score config</Button>
+ <Button onClick={openDialog} text="Archive score config" />
),
},
play: async ({ canvasElement }) => {
@@ -80,7 +80,7 @@ export const TypeToConfirm = meta.story({
variant: "destructive",
onConfirm,
children: ({ openDialog }) => (
- <Button onClick={openDialog}>Delete project</Button>
+ <Button onClick={openDialog} text="Delete project" />
),
},
play: async ({ canvasElement }) => {
diff --git a/web/src/components/design-system/Dialog/Dialog.tsx b/web/src/components/design-system/Dialog/Dialog.tsx
index 9c3a854d48..29c03f8d0a 100644
--- a/web/src/components/design-system/Dialog/Dialog.tsx
+++ b/web/src/components/design-system/Dialog/Dialog.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable boundaries/dependencies */
"use client";
import * as DialogPrimitive from "@radix-ui/react-dialog";
@@ -6,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority";
import { X, type LucideIcon } from "lucide-react";
import * as React from "react";
-import { Button } from "@/src/components/ui/button";
+import { Button } from "@/src/components/design-system/Button/Button";
import { useLayerContainer } from "@/src/context/LayerContext/LayerContext";
import { cn } from "@/src/utils/tailwind";
@@ -133,26 +132,24 @@ function DialogRoot({
{actions?.length ? (
<DialogFooter>
<DialogPrimitive.Close asChild>
- <Button ref={cancelButtonRef} variant="outline">
- Cancel
- </Button>
+ <Button ref={cancelButtonRef} variant="secondary" text="Cancel" />
</DialogPrimitive.Close>
- {actions.map(({ icon: Icon, label, ...buttonProps }, index) => (
- <Button
- key={label}
- ref={(button) => {
- actionButtonRefs.current[index] = button;
- }}
- {...buttonProps}
- >
- <span className="flex items-center gap-1.5">
- {label}
- {Icon ? (
- <Icon className="size-3.5 shrink-0" aria-hidden="true" />
- ) : null}
- </span>
- </Button>
- ))}
+ {actions.map(
+ ({ icon: Icon, label, variant, ...buttonProps }, index) => (
+ <Button
+ key={label}
+ icon={Icon}
+ ref={(button) => {
+ actionButtonRefs.current[index] = button;
+ }}
+ text={label}
+ {...buttonProps}
+ variant={
+ variant === "destructive" ? "destructive" : "primary"
+ }
+ />
+ ),
+ )}
</DialogFooter>
) : null}
</DialogPrimitive.Content>
diff --git a/web/src/components/design-system/IconButton/IconButton.stories.tsx b/web/src/components/design-system/IconButton/IconButton.stories.tsx
new file mode 100644
index 0000000000..f323ae6018
--- /dev/null
+++ b/web/src/components/design-system/IconButton/IconButton.stories.tsx
@@ -0,0 +1,29 @@
+import { Copy } from "lucide-react";
+import { expect, fn, userEvent, within } from "storybook/test";
+
+import preview from "../../../../.storybook/preview";
+import { IconButton } from "./IconButton";
+
+const onClick = fn();
+
+const meta = preview.meta({
+ component: IconButton,
+ args: {
+ icon: Copy,
+ label: "Copy",
+ onClick,
+ },
+});
+
+export const Default = meta.story({});
+
+export const TestClick = meta.story({
+ name: "(Test) Click",
+ play: async ({ canvasElement }) => {
+ onClick.mockClear();
+ await userEvent.click(
+ within(canvasElement).getByRole("button", { name: "Copy" }),
+ );
+ await expect(onClick).toHaveBeenCalledOnce();
+ },
+});
diff --git a/web/src/components/design-system/IconButton/IconButton.tsx b/web/src/components/design-system/IconButton/IconButton.tsx
new file mode 100644
index 0000000000..f6030beef6
--- /dev/null
+++ b/web/src/components/design-system/IconButton/IconButton.tsx
@@ -0,0 +1,70 @@
+import { cva } from "class-variance-authority";
+import { type LucideIcon } from "lucide-react";
+import { type ComponentProps, type Ref } from "react";
+
+const buttonVariants = cva(
+ "inline-flex items-center justify-center rounded-md ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
+ {
+ variants: {
+ variant: {
+ ghost: "hover:bg-accent hover:text-accent-foreground",
+ subtle: "hover:bg-border",
+ },
+ size: {
+ xs: "size-4 rounded-sm",
+ sm: "size-6",
+ md: "size-8",
+ },
+ },
+ defaultVariants: {
+ variant: "ghost",
+ size: "md",
+ },
+ },
+);
+
+const iconVariants = cva("shrink-0", {
+ variants: {
+ size: {
+ xs: "size-3",
+ sm: "size-4",
+ md: "size-4",
+ },
+ },
+ defaultVariants: { size: "md" },
+});
+
+type NativeButtonProps = Omit<
+ ComponentProps<"button">,
+ "aria-label" | "children" | "className" | "style"
+>;
+
+type IconButtonProps = NativeButtonProps & {
+ icon: LucideIcon;
+ label: string;
+ ref?: Ref<HTMLButtonElement>;
+ size?: "xs" | "sm" | "md";
+ variant?: "ghost" | "subtle";
+};
+
+export function IconButton({
+ icon: Icon,
+ label,
+ ref,
+ size,
+ type = "button",
+ variant,
+ ...buttonProps
+}: IconButtonProps) {
+ return (
+ <button
+ {...buttonProps}
+ aria-label={label}
+ className={buttonVariants({ size, variant })}
+ ref={ref}
+ type={type}
+ >
+ <Icon className={iconVariants({ size })} aria-hidden />
+ </button>
+ );
+}
diff --git a/web/src/components/design-system/table/columns/createDropdownTableColumn.tsx b/web/src/components/design-system/table/columns/createDropdownTableColumn.tsx
index 09cc993468..ac0c9c4bb9 100644
--- a/web/src/components/design-system/table/columns/createDropdownTableColumn.tsx
+++ b/web/src/components/design-system/table/columns/createDropdownTableColumn.tsx
@@ -2,7 +2,7 @@
import { type CellContext, type RowData } from "@tanstack/react-table";
import { MoreVertical } from "lucide-react";
-import { Button } from "@/src/components/ui/button";
+import { IconButton } from "@/src/components/design-system/IconButton/IconButton";
import { DropdownMenuController } from "@/src/components/ui/dropdown-menu";
import { Skeleton } from "@/src/components/ui/skeleton";
import {
@@ -34,9 +34,7 @@ export function createDropdownTableColumn<
<DropdownMenuController align="end" renderMenu={() => items}>
{({ Trigger }) => (
<Trigger asChild>
- <Button variant="ghost" size="icon" aria-label="Open menu">
- <MoreVertical className="h-4 w-4" />
- </Button>
+ <IconButton icon={MoreVertical} label="Open menu" />
</Trigger>
)}
</DropdownMenuController>
diff --git a/web/src/features/developer-tools/components/AgentToolsBanner.tsx b/web/src/features/developer-tools/components/AgentToolsBanner.tsx
index 4dec190c3c..b41ee2d149 100644
--- a/web/src/features/developer-tools/components/AgentToolsBanner.tsx
+++ b/web/src/features/developer-tools/components/AgentToolsBanner.tsx
@@ -1,7 +1,5 @@
import { Callout } from "@/src/components/design-system/Callout/Callout";
import { DismissController } from "@/src/components/DismissController";
-import { Button } from "@/src/components/ui/button";
-import Link from "next/link";
import { Bot } from "lucide-react";
const DOCS_HREF =
@@ -20,13 +18,7 @@ export function AgentToolsBanner() {
<Callout
variant="info"
align="middle"
- actions={
- <Button asChild size="sm" variant="secondary">
- <Link href={DOCS_HREF} target="_blank">
- Learn more
- </Link>
- </Button>
- }
+ actions={[{ type: "link", label: "Learn more", href: DOCS_HREF }]}
onDismiss={onDismiss}
>
<div className="flex items-start gap-2 sm:items-center">
diff --git a/web/src/features/evals/pages/remap-evaluator.tsx b/web/src/features/evals/pages/remap-evaluator.tsx
index b8a3316dd9..940114563a 100644
--- a/web/src/features/evals/pages/remap-evaluator.tsx
+++ b/web/src/features/evals/pages/remap-evaluator.tsx
@@ -184,29 +184,19 @@ export default function RemapEvaluatorPage() {
<Callout
variant="info"
align="top"
- actions={
- <>
- {isInAppAgentLauncherVisible ? (
- <Button
- size="sm"
- variant="secondary"
- onClick={handleUseAssistant}
- >
- <BotMessageSquare className="mr-1.5 h-4 w-4" />
- Use Assistant to help with upgrade
- </Button>
- ) : null}
- <Button asChild size="sm" variant="secondary">
- <a
- href={V4_DOCS_URL}
- target="_blank"
- rel="noopener noreferrer"
- >
- Docs
- </a>
- </Button>
- </>
- }
+ actions={[
+ ...(isInAppAgentLauncherVisible
+ ? [
+ {
+ type: "button" as const,
+ label: "Use Assistant to help with upgrade",
+ icon: BotMessageSquare,
+ onClick: handleUseAssistant,
+ },
+ ]
+ : []),
+ { type: "link", label: "Docs", href: V4_DOCS_URL },
+ ]}
onDismiss={onDismiss}
>
<div className="flex items-start gap-2">
diff --git a/web/src/features/v4-migration/V4MigrationBanner.tsx b/web/src/features/v4-migration/V4MigrationBanner.tsx
index 55592e688b..5f646420f3 100644
--- a/web/src/features/v4-migration/V4MigrationBanner.tsx
+++ b/web/src/features/v4-migration/V4MigrationBanner.tsx
@@ -1,10 +1,8 @@
/* eslint-disable no-nested-ternary */
-import Link from "next/link";
import { useSession } from "next-auth/react";
import { Zap } from "lucide-react";
import { Callout } from "@/src/components/design-system/Callout/Callout";
import { DismissController } from "@/src/components/DismissController";
-import { Button } from "@/src/components/ui/button";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics";
import { useAccountV4MigrationData } from "@/src/features/v4-migration/hooks/useV4MigrationData";
import { getProjectMigrationReadiness } from "@/src/features/v4-migration/migrationData";
@@ -66,32 +64,22 @@ export function V4MigrationBanner({
<Callout
variant="info"
align="middle"
- actions={
- <>
- <Button asChild size="sm" variant="secondary">
- <Link
- href="/v4-migration"
- onClick={() =>
- capture("v4_migration:overview_banner_status_clicked")
- }
- >
- Check status
- </Link>
- </Button>
- <Button asChild size="sm" variant="secondary">
- <a
- href={V4_DOCS_URL}
- target="_blank"
- rel="noopener noreferrer"
- onClick={() =>
- capture("v4_migration:overview_banner_docs_clicked")
- }
- >
- Docs
- </a>
- </Button>
- </>
- }
+ actions={[
+ {
+ type: "link",
+ label: "Check status",
+ href: "/v4-migration",
+ onClick: () =>
+ capture("v4_migration:overview_banner_status_clicked"),
+ },
+ {
+ type: "link",
+ label: "Docs",
+ href: V4_DOCS_URL,
+ onClick: () =>
+ capture("v4_migration:overview_banner_docs_clicked"),
+ },
+ ]}
onDismiss={onDismiss}
>
<div className="flex items-start gap-2 sm:items-center">