summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Van Doorn <vandoorn.nick@gmail.com>2019-04-06 15:00:05 -0700
committerNick Van Doorn <vandoorn.nick@gmail.com>2019-04-06 15:00:05 -0700
commit303b5a5fc00108c24c17b58a76e84165fb23321b (patch)
tree40d8f9394b3f405a074b2bbc8f79a4a64412fbd8
parent3cf0c3cd297b43c194d0d6820e13bcf8d8751fdc (diff)
Update readme
-rw-r--r--readme.md32
1 files changed, 31 insertions, 1 deletions
diff --git a/readme.md b/readme.md
index 8423c90..2702989 100644
--- a/readme.md
+++ b/readme.md
@@ -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>
+ )
+}
+```