diff options
author | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-04-06 15:00:05 -0700 |
---|---|---|
committer | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-04-06 15:00:05 -0700 |
commit | 303b5a5fc00108c24c17b58a76e84165fb23321b (patch) | |
tree | 40d8f9394b3f405a074b2bbc8f79a4a64412fbd8 /readme.md | |
parent | 3cf0c3cd297b43c194d0d6820e13bcf8d8751fdc (diff) |
Update readme
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -2,6 +2,36 @@ ## Demo +[https://optimistic-kalam-56c21b.netlify.com](https://optimistic-kalam-56c21b.netlify.com) + ## Usage -## Bugs +```javascript +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> + ) +} +``` |