Files: 6d06fba92397438506f8120c5a1ae2b56c895b64 / app / html / menu.js
508 bytesRaw
1 | const nest = require('depnest') |
2 | const { h, Value } = require('mutant') |
3 | |
4 | exports.gives = nest('app.html.menu') |
5 | |
6 | exports.needs = nest('app.html.menuItem', 'map') |
7 | |
8 | exports.create = function (api) { |
9 | return nest('app.html.menu', menu) |
10 | |
11 | function menu (handleClick) { |
12 | var state = Value('') |
13 | |
14 | return h('Menu', { |
15 | classList: [ state ], |
16 | 'ev-mouseover': () => state.set('-active'), |
17 | 'ev-mouseout': () => state.set('') |
18 | }, [ |
19 | h('div', api.app.html.menuItem(handleClick)) |
20 | ]) |
21 | } |
22 | } |
23 | |
24 |
Built with git-ssb-web