File size: 517 Bytes
cf86710 | 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 | import { DayPicker } from "./react-day-picker-v8";
const bookedDays = [
new Date(2021, 5, 8),
new Date(2021, 5, 9),
new Date(2021, 5, 11)
];
const style = `
.my-booked-class {
color: tomato;
}
`;
export function ModifiersClassnames() {
return (
<>
<style>{style}</style>
<DayPicker
defaultMonth={bookedDays[0]}
modifiers={{
booked: bookedDays
}}
modifiersClassNames={{
booked: "my-booked-class"
}}
/>
</>
);
}
|