MCPcopy
hub / github.com/codeaashu/claude-code / segmentToStyle

Function segmentToStyle

web/components/tools/AnsiRenderer.tsx:185–199  ·  view source on GitHub ↗
(style: AnsiStyle)

Source from the content-addressed store, hash-verified

183}
184
185function segmentToStyle(style: AnsiStyle): React.CSSProperties {
186 return {
187 color: style.color,
188 backgroundColor: style.background,
189 fontWeight: style.bold ? "bold" : undefined,
190 opacity: style.dim ? 0.7 : undefined,
191 fontStyle: style.italic ? "italic" : undefined,
192 textDecoration: [
193 style.underline ? "underline" : "",
194 style.strikethrough ? "line-through" : "",
195 ]
196 .filter(Boolean)
197 .join(" ") || undefined,
198 };
199}
200
201interface AnsiRendererProps {
202 text: string;

Callers 1

AnsiRendererFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected