jxt-react-library
Advanced tools
+32
-0
@@ -11,2 +11,34 @@ 'use strict'; | ||
| function styleInject(css, ref) { | ||
| if (ref === void 0) ref = {}; | ||
| var insertAt = ref.insertAt; | ||
| if (!css || typeof document === 'undefined') { | ||
| return; | ||
| } | ||
| var head = document.head || document.getElementsByTagName('head')[0]; | ||
| var style = document.createElement('style'); | ||
| style.type = 'text/css'; | ||
| if (insertAt === 'top') { | ||
| if (head.firstChild) { | ||
| head.insertBefore(style, head.firstChild); | ||
| } else { | ||
| head.appendChild(style); | ||
| } | ||
| } else { | ||
| head.appendChild(style); | ||
| } | ||
| if (style.styleSheet) { | ||
| style.styleSheet.cssText = css; | ||
| } else { | ||
| style.appendChild(document.createTextNode(css)); | ||
| } | ||
| } | ||
| var css_248z = ".container {\n background-color: red;\n}\n.container .content {\n color: green;\n}\n"; | ||
| styleInject(css_248z); | ||
| function Switch() { | ||
@@ -13,0 +45,0 @@ return /*#__PURE__*/React__default["default"].createElement("div", { |
+1
-2
| { | ||
| "name": "jxt-react-library", | ||
| "version": "1.0.5", | ||
| "version": "1.0.6", | ||
| "main": "lib/bundle.js", | ||
@@ -23,5 +23,4 @@ "author": "gengyudongzzu", | ||
| "rollup-plugin-babel": "^4.4.0", | ||
| "rollup-plugin-less": "^1.1.3", | ||
| "rollup-plugin-postcss": "^4.0.1" | ||
| } | ||
| } |
+1
-1
@@ -48,3 +48,3 @@ import babel from "rollup-plugin-babel"; | ||
| postcss({ | ||
| extract: true, | ||
| // extract: true, | ||
| // minimize: isProductionEnv, | ||
@@ -51,0 +51,0 @@ process: processLess, |
| .container { | ||
| background-color: red; | ||
| } | ||
| .container .content { | ||
| color: green; | ||
| } |
3436
23.69%8
-11.11%90
28.57%6
-14.29%