Skip to content

Commit

Permalink
add demo on codesandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
mg901 committed Oct 12, 2018
1 parent 754c99b commit 58ac1fe
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Simple and powerfull css breakpoints for [styled-components](https://github.com/

> You can use it with [emotion](https://github.com/emotion-js/emotion) too
## Demo

code (https://codesandbox.io/s/23583q00o0)
fullscreen (https://23583q00o0.codesandbox.io/)

## Installation

Use yarn or npm
Expand All @@ -25,7 +30,7 @@ const defaultBreakpoints = {
tablet: '768px',
desktop: '992px',
lgDesktop: '1200px',
}
};
```

```js
Expand Down Expand Up @@ -62,7 +67,7 @@ css`
${media.above('tablet')} {
background-color: hotpink;
}
`
`;
```

Converts to:
Expand All @@ -82,7 +87,7 @@ css`
${media.below('desktop')} {
background-color: lightcoral;
}
`
`;
```

Converts to:
Expand All @@ -103,7 +108,7 @@ css`
${media.between('tablet', 'desktop')} {
background-color: hotpink;
}
`
`;
```

Converts to:
Expand All @@ -124,7 +129,7 @@ css`
${media.only('tablet')} {
background-color: rebeccapurple;
}
`
`;
```

Converts to:
Expand Down

0 comments on commit 58ac1fe

Please sign in to comment.