"use client"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { CalendarDays, List } from "lucide-react"; export type CalendarView = "month" | "list"; interface CalendarViewSwitcherProps { currentView: CalendarView; onViewChange: (view: CalendarView) => void; } const views: { value: CalendarView; label: string; icon: typeof CalendarDays }[] = [ { value: "month", label: "Month", icon: CalendarDays }, { value: "list", label: "List", icon: List }, ]; export function CalendarViewSwitcher({ currentView, onViewChange, }: CalendarViewSwitcherProps) { return (
{views.map((view) => { const Icon = view.icon; return ( ); })}
); }