Files: fea2881ae175c88bac926fcff65d32598742e9a1 / app / html / link.js
402 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | |
4 | exports.gives = nest('app.html.link') |
5 | |
6 | exports.needs = nest({ |
7 | 'history.sync.push': 'first' |
8 | }) |
9 | |
10 | exports.create = (api) => { |
11 | return nest('app.html.link', (location, body) => { |
12 | return h('Link', { |
13 | 'ev-click': () => api.history.sync.push(location), |
14 | className: typeof body === 'string' ? '-string' : '' |
15 | }, body) |
16 | }) |
17 | } |
18 |
Built with git-ssb-web