Files: 64e9abb6cd8d8e8be200248e9a8eeabe10f3dfe2 / test / index-classic-cal.js
894 bytesRaw
1 | // run this from the terminal using : |
2 | // npx electro test/index-classic-cal.js |
3 | |
4 | const { h } = require('mutant') |
5 | |
6 | const Marama = require('../') |
7 | require('../lib/styles-inject')() |
8 | |
9 | const 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', |
25 | tileRadius: 18, |
26 | tileGap: 4 |
27 | } |
28 | }) |
29 | |
30 | const page = h('div', |
31 | { |
32 | style: { margin: '3rem' } |
33 | }, |
34 | marama |
35 | ) |
36 | |
37 | document.body.appendChild(page) |
38 |
Built with git-ssb-web