Replies: 1 comment
|
Hi, I'm not sure exactly what you've tried (it might be helpful to share a code snippet) but there are 3 ways I'd recommend trying to set text colors given a dark/light mode. Option 1: Primer CSS Text Colors<ActionList.Item className='color-fg-success'>
Placeholder Text
</ActionList.Item>You can set the Examples:
Option 2: Primer Text<Text color='fg.subtle'>
Placeholder Text
</Text>If you're using a Option 3: Custom Colors{/* When returning your React component, pass it your custom color scheme */}
<Caption color={captionColor}>
Placeholder Text
</Caption>// Define the custom color scheme: which colors per color mode
const captionColor = useColorSchemeVar({
light: '#596069',
dark: '#8d949d',
});// Tell your component to use the color scheme
const Caption = styled(Text)`
color: ${props => props.color};
`;If you don't love the color options that are already available, you can set your own. You'll have to use the Footnotes
|
Uh oh!
There was an error while loading. Please reload this page.
I am currently maintaining both dark mode and light mode in my project, but I'm encountering difficulty accessing the option text color. Can someone please assist me with this issue?


All reactions