Skip to content

Commit aa70ee8

Browse files
committed
token comment color changed for better accessibility
1 parent d1ab97a commit aa70ee8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/mdx/code.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,14 @@ function Code({className = '', prompt, children}) {
114114
{tokens.map((line, i) => (
115115
<Box key={i} {...getLineProps({line, key: i})}>
116116
{line.map((token, key) => (
117-
<MonoText key={key} {...getTokenProps({token, key})} />
117+
<MonoText
118+
key={key}
119+
{...{
120+
...getTokenProps({ token, key }),
121+
style: getTokenProps({ token, key }).className === 'token comment'
122+
? { ...getTokenProps({ token, key }).style, color: '#747459' }
123+
: getTokenProps({ token, key }).style
124+
}} />
118125
))}
119126
</Box>
120127
))}

0 commit comments

Comments
 (0)