git ssb

3+

arj / patchbook



Tree: 24301103fc79102ebc4d71e1454571b15c58592e

Files: 24301103fc79102ebc4d71e1454571b15c58592e / book / html / description.js

605 bytesRaw
1const nest = require('depnest')
2const { h, computed, when } = require('mutant')
3
4exports.needs = nest({
5 'message.html.markdown': 'first'
6})
7
8exports.gives = nest('book.html.description')
9
10exports.create = (api) => {
11 return nest('book.html.description', description)
12 function description ({description, isEditing, onUpdate}) {
13 const markdown = api.message.html.markdown
14 const input = h('textarea', {'ev-input': e => onUpdate(e.target.value), value: description})
15
16 return h('Description', [
17 when(isEditing,
18 input,
19 computed(description, markdown)
20 )
21 ])
22 }
23}
24

Built with git-ssb-web