I need to convert a Material UI icon to white because background is another color.
I am importing white from their core colors library:
import { white } from '@material-ui/core/colors';
So I can do:
style={{ color: white }}
However, I am getting an error message:
./src/components/footer.js
Attempted import error: 'white' is not exported from '@material-ui/core/colors'.
I cannot see what I am doing wrong based on their docs. I have throughly researched why I am getting this error but couldn't find solution.
Check available color palette from MaterialUI here
White is not available.
But you can use 'white'
as string, as CSS has 'white' as value
style={{ color: 'white' }}
A complete list of colors supported by CSS can be found here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With