Files: 9ebbbea9829c7cc67a7fd3e50d57216f25b6a4fb / main / html / scroller.js
536 bytesRaw
1 | const { h } = require('mutant') |
2 | const nest = require('depnest') |
3 | |
4 | exports.gives = nest('main.html.scroller') |
5 | |
6 | exports.create = function (api) { |
7 | return nest('main.html.scroller', Scroller) |
8 | |
9 | function Scroller ({ prepend = [], append = [] } = {}) { |
10 | const content = h('section.content') |
11 | |
12 | const container = h('Scroller', { style: { overflow: 'auto' } }, [ |
13 | h('div.wrapper', [ |
14 | h('header', prepend), |
15 | content, |
16 | h('footer', append) |
17 | ]) |
18 | ]) |
19 | |
20 | return { |
21 | content, |
22 | container |
23 | } |
24 | } |
25 | } |
26 | |
27 |
Built with git-ssb-web