Skip to content

Commit fc6d16c

Browse files
authored
Merge pull request #41 from RonasIT/PRD-2152-code-block-bg-color-fix
PRD-2152: code block background color fix
2 parents df9613c + 3f70792 commit fc6d16c

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

libs/mobile/shared/features/markdown-view/src/lib/component.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function AppMarkdownView({
5454
) => {
5555
return (
5656
<CodeBlock
57-
fenceStyle={[inheritedStyles, markdownStyles.fence]}
57+
fenceStyle={inheritedStyles}
5858
key={`code-block-${node.key}`}
5959
sourceInfo={node.sourceInfo}
6060
content={node.content}
@@ -302,9 +302,4 @@ const markdownStyles = createStyles({
302302
backgroundColor: colorScheme.get() === 'dark' ? colors.gray700 : colors.gray75,
303303
textDecorationLine: 'none',
304304
},
305-
fence: {
306-
backgroundColor: colorScheme.get() === 'dark' ? colors.gray700 : colors.gray75,
307-
borderRadius: 8,
308-
padding: 12,
309-
},
310305
});

libs/mobile/shared/ui/code-block/src/lib/component.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ export function CodeBlock({
5656
return (
5757
<View className='gap-4'>
5858
{copyButton}
59-
<AppText style={fenceStyle}>{formattedContent}</AppText>
59+
<AppText style={fenceStyle} className={'bg-background-tertiary rounded-lg p-12'}>
60+
{formattedContent}
61+
</AppText>
6062
</View>
6163
);
6264
}

0 commit comments

Comments
 (0)