Skip to content

Commit

Permalink
Update for preact 7, now requires preact 7+
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Jan 14, 2017
1 parent ad1e19c commit eb38f89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@
},
"homepage": "https://github.com/developit/preact-mdl",
"peerDependencies": {
"preact": "*"
},
"optionalDependencies": {
"preact": "*"
"preact": ">=7"
},
"devDependencies": {
"babel-core": "^6.5.2",
Expand Down Expand Up @@ -69,7 +66,7 @@
"npm-run-all": "^1.7.0",
"phantomjs": "^2.1.3",
"phantomjs-prebuilt": "^2.1.4",
"preact": "^4.6.2",
"preact": "^7.1.0",
"preact-jsx-chai": "^1.4.1",
"pretty-bytes-cli": "^1.0.0",
"rollup": "^0.25.4",
Expand Down
15 changes: 0 additions & 15 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,6 @@ export class MaterialComponent extends Component {
}
}
}

for (let i=c.length; i--; ) {
if (c[i].className && c[i].className.match(/\bmdl-[a-z0-9_-]+__ripple-container\b/g)) {
let s = c[i].firstElementChild;
(r.children = r.children || []).splice(i, 0, (
<span class={ c[i].getAttribute('class') } data-upgraded={ c[i].getAttribute('data-upgraded') }>
<span class={ s.getAttribute('class') } style={ s.getAttribute('style') } />
</span>
));
foundRipple = true;
}
else if (r && r.children && r.children[i] && typeof r.children[i].nodeName==='string') {
this.preserveMdlDom(c[i], r.children[i]);
}
}
}

createMdlClasses(props) {
Expand Down

0 comments on commit eb38f89

Please sign in to comment.