blob: 1e35ba61704d7b8090885cabff5a2e3ce3ed61fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Create a module to keep
// our template functions
// out of the global scope
let Templates = (function() {
return {
// Allowing an id to be passed in is very useful
// for finding this node after it gets mounted
circle(id = '') {
return `<circle class="circle" id="${id}" r="4"/>`
},
svg(id = '', children) {
return `<svg class="container" id="${id}">${children}</svg>`
}
}
})()
|