I'm trying to reference a color variable from my main.scss file within my component but not sure what the correct syntax is. Right now it works by hard coding the color hex value.
I can make it work by adding an external stylsheet, and referencing the theme color that way however don't want to create an extra file but rather use internal styling.
Here's main.scs:
$theme-colors: (
'primary': #00a677,
);
Here's the component:
import React from 'react';
const box = {
color: '#9D2235',
};
const Box = () => {
return(
<div style={box}><h1>I'm A Box!</h1></div>
)
}
export default Box;
Any idea how I can do this?