Skip to content

Commit

Permalink
use className in MVL
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Jun 9, 2019
1 parent c206837 commit 96280ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/moon-mvl/dist/moon-mvl.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ function addClass(element, name) {
if (elementName[0] === elementName[0].toLowerCase() && elementName !== "if" && elementName !== "else-if" && elementName !== "else" && elementName !== "for" && elementName !== "text") {
var elementAttributes = element.attributes;

if (elementAttributes["class"] === undefined) {
elementAttributes["class"] = {
if (elementAttributes.className === undefined) {
elementAttributes.className = {
value: "\"" + name + "\"",
isStatic: true
};
} else {
elementAttributes["class"].value += " + \" " + name + "\"";
elementAttributes.className.value += " + \" " + name + "\"";
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/moon-mvl/dist/moon-mvl.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/moon-mvl/src/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export function addClass(element, name) {
) {
const elementAttributes = element.attributes;

if (elementAttributes.class === undefined) {
elementAttributes.class = {
if (elementAttributes.className === undefined) {
elementAttributes.className = {
value: `"${name}"`,
isStatic: true
};
} else {
elementAttributes.class.value += ` + " ${name}"`;
elementAttributes.className.value += ` + " ${name}"`;
}
}

Expand Down

0 comments on commit 96280ad

Please sign in to comment.