summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'readme.md')
-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>
+ )
+}
+```