Last active
January 17, 2016 05:01
-
-
Save colingourlay/3b35fd25c79643799955 to your computer and use it in GitHub Desktop.
Using crel + hyperstyles (browser only)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hyperstyles = require('hyperstyles'); | |
var styles = { /* Mock CSS Module */ | |
'root': 'Car__root___fg434', | |
'front-door': 'Car__front-door___b85f9', | |
'back-door': 'Car__back-door___p9h7j' | |
}; | |
var crel = hyperstyles(require('crel'), styles); | |
function render() { | |
return crel('div.root', | |
crel('div.front-door'), | |
crel('div.back-door') | |
); | |
} | |
console.log(render()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="Car__root___fg434"> | |
<div class="Car__front-door___b85f9"></div> | |
<div class="Car__back-door___p9h7j"></div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment