1.0.0 • Published 5 years ago
sunlight-theme v1.0.0
sunlight-theme
Demo
https://optimistic-kalam-56c21b.netlify.com
Usage
const containerStyle = ({ colours }) => css`
color: ${colours.main};
`
const mainRange = colormap({
colormap: 'autumn',
nshades: 11,
format: 'hex',
alpha: 1
})
const colourMiddleware = theme => {
return {
...theme,
colours: {
main: mainRange[theme.lightLevel]
}
}
}
export const DemoComponent = ({ children }) => {
return (
<SunlightTheme middleware={[colourMiddleware]}>
<div css={containerStyle}>{children}</div>
</SunlightTheme>
)
}
1.0.0
5 years ago