Files
nanobot/webui/src/components/InlineTokenHighlight.tsx
T
chengyongru c24153db86 fix(ui): keep theme text and selections readable (#6226)
* fix(ui): keep theme text and selections readable

* fix(tui): theme the blank composer cursor cell

* refactor(webui): centralize diff theme colors

* fix(tui): keep conversation selections readable

* fix(ui): preserve nested syntax colors and selection lifetimes
2026-10-15 15:21:28 +08:00

34 lines
624 B
TypeScript

import type { ReactNode } from "react";
import { cn } from "@/lib/utils";
export const INLINE_TOKEN_HIGHLIGHT_COLOR = "var(--inline-token-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>
);
}