styled-components-theme
styled-components-theme copied to clipboard
Added nested colors in theme.
Now have nested colors in theme. For example:
// theme passed to ThemeProvider
const theme = {
ui: {
color: '#424242'
}
}
// Button can be styled as below:
const Button = styled.button`
color: ${theme.ui.color};
&:hover {
color: ${theme.ui.color.darken(0.1)};
}
`
I'm pretty new to JS and moved the code around a bit, so feel free to edit/close without merging.