Allow themes to theme the UI (#769)

This commit is contained in:
Miguel Solorio
2025-06-05 14:35:47 -07:00
committed by GitHub
parent 2285bba66e
commit 8a0a2523ca
33 changed files with 533 additions and 385 deletions

View File

@@ -107,7 +107,7 @@ export function colorizeCode(
<Text>
{lines.map((line, index) => (
<Text key={index}>
<Text color={activeTheme.colors.SubtleComment}>
<Text color={activeTheme.colors.Gray}>
{`${String(index + 1).padStart(padWidth, ' ')} `}
</Text>
<Text color={activeTheme.defaultColor}>
@@ -138,7 +138,7 @@ export function colorizeCode(
<Text color={activeTheme.defaultColor}>
{`${String(index + 1).padStart(padWidth, ' ')} `}
</Text>
<Text color={activeTheme.colors.SubtleComment}>{line}</Text>
<Text color={activeTheme.colors.Gray}>{line}</Text>
{index < lines.length - 1 && '\n'}
</Text>
))}

View File

@@ -121,7 +121,7 @@ const MarkdownDisplayInternal: React.FC<MarkdownDisplayProps> = ({
break;
case 4:
headerNode = (
<Text italic color={Colors.SubtleComment}>
<Text italic color={Colors.Gray}>
<RenderInline text={headerText} />
</Text>
);
@@ -358,9 +358,7 @@ const RenderCodeBlockInternal: React.FC<RenderCodeBlockProps> = ({
// Not enough space to even show the message meaningfully
return (
<Box padding={CODE_BLOCK_PADDING}>
<Text color={Colors.SubtleComment}>
... code is being written ...
</Text>
<Text color={Colors.Gray}>... code is being written ...</Text>
</Box>
);
}
@@ -372,7 +370,7 @@ const RenderCodeBlockInternal: React.FC<RenderCodeBlockProps> = ({
return (
<Box flexDirection="column" padding={CODE_BLOCK_PADDING}>
{colorizedTruncatedCode}
<Text color={Colors.SubtleComment}>... generating more ...</Text>
<Text color={Colors.Gray}>... generating more ...</Text>
</Box>
);
}