react-css-styler
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/react-css-styler.git | ||
version: 0.1.0 | ||
version: 0.1.1 | ||
*/ | ||
@@ -97,2 +97,3 @@ 'use strict'; | ||
var style = document.createElement("style"); | ||
style.setAttribute("type", "text/css"); | ||
style.innerHTML = css.replace(/([^}{]*){/mg, function (all, selector) { | ||
@@ -129,3 +130,5 @@ return utils.splitComma(selector).map(function (subSelector) { | ||
return React.createElement(Tag, __assign({}, attributes)); | ||
return React.createElement(Tag, __assign({ | ||
className: className + " " + injectClassName | ||
}, attributes)); | ||
}; | ||
@@ -132,0 +135,0 @@ |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/react-css-styler.git | ||
version: 0.1.0 | ||
version: 0.1.1 | ||
*/ | ||
@@ -95,2 +95,3 @@ import React from 'react'; | ||
var style = document.createElement("style"); | ||
style.setAttribute("type", "text/css"); | ||
style.innerHTML = css.replace(/([^}{]*){/mg, function (all, selector) { | ||
@@ -127,3 +128,5 @@ return splitComma(selector).map(function (subSelector) { | ||
return React.createElement(Tag, __assign({}, attributes)); | ||
return React.createElement(Tag, __assign({ | ||
className: className + " " + injectClassName | ||
}, attributes)); | ||
}; | ||
@@ -130,0 +133,0 @@ |
{ | ||
"name": "react-css-styler", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "This component is a lightweight, simple line style component.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/styler.cjs.js", |
import stringHash from "string-hash"; | ||
import { splitComma } from "@daybrush/utils"; | ||
export function getHash(str: string) { | ||
@@ -9,2 +10,3 @@ return stringHash(str).toString(36); | ||
style.setAttribute("type", "text/css"); | ||
style.innerHTML = css.replace(/([^}{]*){/mg, (all, selector) => { | ||
@@ -11,0 +13,0 @@ return splitComma(selector).map(subSelector => `.${className} ${subSelector}`).join(", ") + "{"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
383791
1051