Skip to content

Commit b8eccde

Browse files
authored
Merge pull request #18 from tomihq/dev
2 parents 9f4b666 + 0657587 commit b8eccde

File tree

9 files changed

+1501
-1277
lines changed

9 files changed

+1501
-1277
lines changed

components/accordion/calendar-accordion.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"use client";
22

33
import { AnimatePresence, motion } from "framer-motion";
4+
import { Button, buttonVariants } from "../ui/button";
45
import { useLocale, useTranslations } from "next-intl";
56

6-
import { Button } from "../ui/button";
77
import { Calendar as CalendarComponent } from "@/components/ui/calendar";
88
import { CalendarIcon } from "lucide-react";
99
import { PRIMARY_COLOR } from "@/lib/colors";
@@ -53,15 +53,19 @@ const CalendarAccordion = ({
5353
)}
5454
defaultMonth={date}
5555
classNames={{
56-
day_selected: cn(
57-
"",
58-
`bg-${PRIMARY_COLOR[theme]}-500 text-white hover:bg-${PRIMARY_COLOR[theme]}-500 hover:text-${PRIMARY_COLOR[theme]}-50 focus:bg-${PRIMARY_COLOR[theme]}-500 focus:text-${PRIMARY_COLOR[theme]}-50`
59-
),
60-
day_today: cn(
61-
"",
62-
`bg-${PRIMARY_COLOR[theme]}-100 text-${PRIMARY_COLOR[theme]}-900`
56+
months: "w-full",
57+
head_row: "flex justify-between",
58+
row: "w-full mt-2 flex justify-between",
59+
day: cn(
60+
buttonVariants({ variant: "ghost" }),
61+
"h-8 w-8 p-0 text-lg aria-selected:opacity-100"
6362
),
6463
}}
64+
modifiersClassNames={{
65+
today: "text-green-500",
66+
selected:
67+
"bg-green-500 text-white hover:bg-green-500 hover:text-white",
68+
}}
6569
mode='single'
6670
selected={date}
6771
onSelect={(date) => {

0 commit comments

Comments
 (0)