UNPKG

909 BTypeScriptView Raw
1import React from "react";
2
3import { DayPicker, getDefaultClassNames } from "react-day-picker";
4
5export function TailwindCSS() {
6 const defaultClassNames = getDefaultClassNames();
7 return (
8 <>
9 <style>
10 {`
11 .bg-amber-500 { background-color: #f59e0b; }
12 .border-amber-500 { border-color: #f59e0b; }
13 .text-white { color: #fff; }
14 .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
15 .p-5 { padding: 1.25rem; }
16 .fill-amber-500 { fill: #f59e0b; }
17 `}
18 </style>
19 <DayPicker
20 mode="single"
21 classNames={{
22 today: `border-amber-500`,
23 selected: `bg-amber-500 border-amber-500 text-white`,
24 root: `${defaultClassNames.root} bg-white shadow-lg p-5`,
25 chevron: `${defaultClassNames.chevron} fill-amber-500`
26 }}
27 />
28 </>
29 );
30}