Skip to content

Commit

Permalink
Pass meta: ‘jss-simple’ to jss.createStyleSheet()
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Kohlmann committed May 5, 2017
1 parent cb4bf73 commit d45bb45
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,25 @@ let map = {};
* JSS Simple
*/

const defaultOpts = {
meta: 'jss-simple'
};

function css(style, opts, key) {
let localKey = key;
let localOpts = opts;
let localOpts;

if (typeof opts === 'object' && opts !== null) {
// Merge with defaultOpts
localOpts = {
...defaultOpts,
...opts
};
}

if (typeof opts === 'string') {
else if (typeof opts === 'string') {
localKey = opts;
localOpts = undefined;
localOpts = defaultOpts;
}

const sheet = jss.createStyleSheet(style, localOpts);
Expand Down

0 comments on commit d45bb45

Please sign in to comment.