Files: 1e24c51528660ca6d322ca62c6566f9b047c6412 / 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