Update default text styles (#8291)

This commit is contained in:
Miguel Solorio
2025-09-11 14:22:16 -07:00
committed by GitHub
parent aba2a9932c
commit 67f7dae4e3
7 changed files with 21 additions and 10 deletions

View File

@@ -31,8 +31,9 @@ function renderHastNode(
inheritedColor: string | undefined,
): React.ReactNode {
if (node.type === 'text') {
// Use the color passed down from parent element, if any
return <Text color={inheritedColor}>{node.value}</Text>;
// Use the color passed down from parent element, or the theme's default.
const color = inheritedColor || theme.defaultColor;
return <Text color={color}>{node.value}</Text>;
}
// Handle Element Nodes: Determine color and pass it down, don't wrap

View File

@@ -188,7 +188,7 @@ const MarkdownDisplayInternal: React.FC<MarkdownDisplayProps> = ({
break;
case 3:
headerNode = (
<Text bold>
<Text bold color={theme.text.primary}>
<RenderInline text={headerText} />
</Text>
);
@@ -386,10 +386,10 @@ const RenderListItemInternal: React.FC<RenderListItemProps> = ({
flexDirection="row"
>
<Box width={prefixWidth}>
<Text>{prefix}</Text>
<Text color={theme.text.primary}>{prefix}</Text>
</Box>
<Box flexGrow={LIST_ITEM_TEXT_FLEX_GROW}>
<Text wrap="wrap">
<Text wrap="wrap" color={theme.text.primary}>
<RenderInline text={itemText} />
</Text>
</Box>