git ssb

0+

mixmix / marama



Tree: ca2790e4654757e6f97c0d5cff97163c1865af61

Files: ca2790e4654757e6f97c0d5cff97163c1865af61 / example / 1_marama.js

904 bytesRaw
1// run this from the terminal using :
2// npx electro example/1_classic-cal.js
3
4const { h } = require('mutant')
5
6const Marama = require('../')
7require('../lib/styles-inject')()
8
9const marama = Marama({
10 today: new Date(2018, 6, 12),
11 events: [
12 { date: new Date(2018, 3, 4), data: { attending: true } },
13 { date: new Date(2018, 6, 5), data: { attending: true } },
14 { date: new Date(2018, 6, 7), data: { attending: false } },
15 { date: new Date(2018, 6, 17), data: { attending: true } },
16 { date: new Date(2018, 6, 21), data: { attending: false } },
17 { date: new Date(2018, 6, 27), data: { attending: true } }
18 ],
19 range: {
20 gte: new Date(2018, 6, 9),
21 lt: new Date(2018, 6, 23)
22 },
23 styles: {
24 weekFormat: 'rows', // default
25 tileRadius: 18,
26 tileGap: 4
27 }
28})
29
30const page = h('div',
31 {
32 style: { margin: '3rem' }
33 },
34 marama
35)
36
37document.body.appendChild(page)
38

Built with git-ssb-web