Commit 1952a47a authored by Naoyuki Kanezawa's avatar Naoyuki Kanezawa Committed by GitHub

Merge pull request #39 from zeit/add/css-default-export

Exposing glamor style as default
parents 09a9eb08 6743e2b0
module.exports = require('glamor')
const css = require('glamor')
/**
* Expose style as default and the whole object as properties
* so it can be used as follows:
*
* import css, { merge } from 'next/css'
* css({ color: 'red' })
* merge({ color: 'green' })
* css.merge({ color: 'blue' })
*/
css.default = css.style
Object.keys(css).forEach(key => {
if (key !== 'default') {
css.default[key] = css[key]
}
})
module.exports = css
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment