├── .babelrc ├── .gitignore ├── .travis.yml ├── README.md ├── components ├── __tests__ │ ├── __snapshots__ │ │ └── toggle-button.js.snap │ └── toggle-button.js └── toggle-button.js ├── jest.config.js ├── next.config.js ├── package.json └── pages ├── _document.js └── index.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["next/babel", "env"], 3 | "plugins": ["glamorous-displayname"] 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next 3 | out 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | cache: 4 | directories: 5 | - node_modules 6 | notifications: 7 | email: false 8 | node_js: 9 | - '8' 10 | script: 11 | - npm run validate 12 | branches: 13 | only: 14 | - master 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | glamorous-with-next 3 |
4 | glamorous 5 |
6 |

7 |

8 | How to use glamorous with 9 | Next.js 10 |

11 | 12 |
13 | 14 | [![Build Status][build-badge]][build] 15 | 16 | Sponsor 17 | 18 | ## The problem 19 | 20 | I'm making a course about glamorous for Egghead.io and I wanted to demonstrate 21 | a few things about glamorous that I can't demonstrate in CodeSandbox (like 22 | testing, the babel plugin, and server rendering). 23 | 24 | ## This solution 25 | 26 | This is a bare-bones application that demonstrates those things. 27 | 28 | ## LICENSE 29 | 30 | MIT 31 | 32 | [build-badge]: https://img.shields.io/travis/paypal/downshift.svg?style=flat-square 33 | [build]: https://travis-ci.org/paypal/downshift 34 | -------------------------------------------------------------------------------- /components/__tests__/__snapshots__/toggle-button.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`has different styles when on: true 1`] = ` 4 | Snapshot Diff: 5 | - First value 6 | + Second value 7 | 8 | @@ -8,22 +8,22 @@ 9 | line-height: 1.4; 10 | text-align: center; 11 | cursor: pointer; 12 | border-radius: 4px; 13 | color: #fff; 14 | - background-color: #337ab7; 15 | - border-color: #285f8f; 16 | + background-color: #22527b; 17 | + border-color: #173853; 18 | } 19 | 20 | .glamor-0:hover, 21 | [data-glamor-0]:hover, 22 | .glamor-0:active, 23 | [data-glamor-0]:active, 24 | .glamor-0:focus, 25 | [data-glamor-0]:focus { 26 | - background-color: #285f8f; 27 | - border-color: #1d4567; 28 | + background-color: #1d4567; 29 | + border-color: #122a3f; 30 | } 31 | 32 |