Files: 741ac0a148c2a18f2bc5d54ad7582e7c82430d2b / modules / sheet / display.js
502 bytesRaw
1 | var h = require('mutant/h') |
2 | var nest = require('depnest') |
3 | |
4 | exports.gives = nest('sheet.display') |
5 | |
6 | exports.create = function () { |
7 | return nest('sheet.display', function (handler) { |
8 | var {content, footer, mounted} = handler(done) |
9 | |
10 | var container = h('div', {className: 'Sheet'}, [ |
11 | h('section', [content]), |
12 | h('footer', [footer]) |
13 | ]) |
14 | |
15 | document.body.appendChild(container) |
16 | |
17 | if (mounted) mounted() |
18 | |
19 | function done () { |
20 | document.body.removeChild(container) |
21 | } |
22 | }) |
23 | } |
24 |
Built with git-ssb-web