MCPcopy Create free account
hub / github.com/MagicCube/agentara / TokenSpan

Function TokenSpan

web/src/components/ai-elements/code-block.tsx:66–82  ·  view source on GitHub ↗
({ token }: { token: ThemedToken })

Source from the content-addressed store, hash-verified

64
65// Token rendering component
66const TokenSpan = ({ token }: { token: ThemedToken }) => (
67 <span
68 className="dark:!bg-[var(--shiki-dark-bg)] dark:!text-[var(--shiki-dark)]"
69 style={
70 {
71 backgroundColor: token.bgColor,
72 color: token.color,
73 fontStyle: isItalic(token.fontStyle) ? "italic" : undefined,
74 fontWeight: isBold(token.fontStyle) ? "bold" : undefined,
75 textDecoration: isUnderline(token.fontStyle) ? "underline" : undefined,
76 ...token.htmlStyle,
77 } as CSSProperties
78 }
79 >
80 {token.content}
81 </span>
82);
83
84// Line rendering component
85const LineSpan = ({

Callers

nothing calls this directly

Calls 3

isItalicFunction · 0.85
isBoldFunction · 0.85
isUnderlineFunction · 0.85

Tested by

no test coverage detected