UNPKG

478 BTypeScriptView Raw
1import React from "react";
2
3import { DayPicker } from "react-day-picker";
4
5const availableDays = [new Date(2021, 5, 23), new Date(2021, 5, 24)];
6
7const availableStyle = {
8 fontWeight: 900,
9 color: "lightgreen"
10};
11
12export function ModifiersStyle() {
13 return (
14 <DayPicker
15 mode="single"
16 defaultMonth={availableDays[0]}
17 modifiers={{
18 available: availableDays
19 }}
20 modifiersStyles={{
21 available: availableStyle
22 }}
23 />
24 );
25}