1 | import React from "react";
|
2 |
|
3 | import { DayPicker } from "../DayPicker";
|
4 |
|
5 | import { DateRange } from "./shared";
|
6 |
|
7 | const Test = () => {
|
8 | return (
|
9 | <>
|
10 | <DayPicker />
|
11 | <DayPicker mode="single" />
|
12 | <DayPicker
|
13 | mode="single"
|
14 | selected={undefined}
|
15 | onSelect={(date: Date | undefined) => {}}
|
16 | />
|
17 | <DayPicker
|
18 | mode="single"
|
19 | selected={new Date()}
|
20 | onSelect={(date: Date | undefined) => {}}
|
21 | />
|
22 | {}
|
23 | <DayPicker
|
24 | mode="single"
|
25 | required
|
26 | onSelect={(date: Date | undefined) => {}}
|
27 | />
|
28 | {}
|
29 | <DayPicker mode="single" required selected={undefined} />
|
30 | <DayPicker
|
31 | mode="multiple"
|
32 | required
|
33 | selected={undefined}
|
34 | onSelect={(selected: Date[], date: Date, modifiers) => {}}
|
35 | />
|
36 | <DayPicker
|
37 | mode="range"
|
38 | required
|
39 | selected={undefined}
|
40 | onSelect={(selected: DateRange, date: Date, modifiers) => {}}
|
41 | />
|
42 | <DayPicker
|
43 | mode="multiple"
|
44 | required={false}
|
45 | selected={undefined}
|
46 |
|
47 | onSelect={(selected: Date[], date: Date, modifiers) => {}}
|
48 | />
|
49 | {}
|
50 | <DayPicker mode="multiple" selected={new Date()} />
|
51 | <DayPicker mode="multiple" onSelect={(date: Date[] | undefined) => {}} />
|
52 | <DayPicker
|
53 | mode="multiple"
|
54 | required
|
55 | selected={[]}
|
56 | onSelect={(date: Date[]) => {}}
|
57 | />
|
58 | <DayPicker mode="single" selected={new Date()} />
|
59 | <DayPicker modifiers={{ selected: new Date() }} onDayClick={() => {}} />
|
60 | <DayPicker
|
61 | onSelect={() => {}}
|
62 | selected={new Date()}
|
63 | onDayClick={() => {}}
|
64 | />
|
65 | </>
|
66 | );
|
67 | };
|
68 |
|
69 | it("should type-check", () => {
|
70 | expect(Test).toBeTruthy();
|
71 | });
|