Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e164074 commit 6743e2bCopy full SHA for 6743e2b
lib/css.js
@@ -1 +1,20 @@
1
-module.exports = require('glamor')
+const css = require('glamor')
2
+
3
+/**
4
+ * Expose style as default and the whole object as properties
5
+ * so it can be used as follows:
6
+ *
7
+ * import css, { merge } from 'next/css'
8
+ * css({ color: 'red' })
9
+ * merge({ color: 'green' })
10
+ * css.merge({ color: 'blue' })
11
+ */
12
13
+css.default = css.style
14
+Object.keys(css).forEach(key => {
15
+ if (key !== 'default') {
16
+ css.default[key] = css[key]
17
+ }
18
+})
19
20
+module.exports = css
0 commit comments