-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.tsx
33 lines (29 loc) · 904 Bytes
/
demo.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import './src/base.css';
import './src/month.css';
import React from 'react';
import { createRoot } from 'react-dom/client';
import { MonthView } from './src/MonthView';
const dt = new Date();
dt.setDate(dt.getDate() - 1);
const events = [
{ start: new Date(), minutes: 30, title: 'Test event h.' },
{ start: new Date(), minutes: 30, title: 'Test event with long tiah.' },
{
start: new Date(dt.setHours(dt.getHours() + 2)),
minutes: 30,
title: 'Test 2 event with long title, yeah yeah.',
},
{
start: new Date(dt.setDate(dt.getDate() + 2)),
minutes: 30,
title: 'Test 2 event with long title, yeah yeah.',
},
];
function App() {
return <MonthView month={6} year={2022} events={events} />;
}
const container = document.getElementById('app');
if (container) {
const root = createRoot(container);
root.render(<App />);
}