The following works great in my function:
console.log(theme.colors.blues[1]);
I'm trying to make the last part dynamic like so:
const getColor = (theme, passedColorProp) => {
console.log(theme.colors.[passedColorProp]);
};
getColor("blues[1]");
This is currently erring with:
Module build failed: SyntaxError: Unexpected token (15:27)**
How can I make this work?