Files
nanobot/webui/src/components/InlineTokenHighlight.tsx
T
chengyongru 424d2debc2 fix(webui): unify skill and session link highlighting (#6454)
* fix(webui): refine skill reference highlighting

* fix(webui): highlight composer skills and align session links
2026-10-25 21:42:53 +08:00

35 lines
709 B
TypeScript

import type { ReactNode } from "react";
import { cn } from "@/lib/utils";
export const INLINE_TOKEN_HIGHLIGHT_COLOR = "var(--inline-token-highlight)";
export const INLINE_REFERENCE_HIGHLIGHT_COLOR = "var(--inline-reference-highlight)";
export function InlineTokenHighlight({
children,
className,
color,
testId,
title,
}: {
children: ReactNode;
className?: string;
color?: string;
testId?: string;
title?: string;
}) {
return (
<span
data-testid={testId}
title={title}
className={cn(
"relative inline font-[550] text-foreground transition-colors duration-150",
className,
)}
style={{ color }}
>
{children}
</span>
);
}