diff --git a/packages/atoms/availability-list/components/controls/index.tsx b/packages/atoms/availability-list/components/controls/index.tsx new file mode 100644 index 0000000000..69c8a79b48 --- /dev/null +++ b/packages/atoms/availability-list/components/controls/index.tsx @@ -0,0 +1,60 @@ +import { Button } from "@/components/ui/button"; +import { + DropdownMenu, + DropdownMenuTrigger, + DropdownMenuContent, + DropdownMenuItem, +} from "@/components/ui/dropdown-menu"; +import { Toaster } from "@/components/ui/toaster"; +import type { Schedule } from "availability-list"; +import { MoreHorizontal, Star, Copy, Trash } from "lucide-react"; + +type ControlsProps = { + schedule: Schedule; + handleDelete: () => void; + handleDuplicate: () => void; + handleSetDefault: () => void; +}; + +export function Controls({ schedule, handleDelete, handleDuplicate, handleSetDefault }: ControlsProps) { + return ( + <> + + + + + + {!schedule.isDefault && ( + { + handleSetDefault(); + }} + className="min-w-40 focus:ring-mute min-w-40 focus:ring-muted"> + + Set as default + + )} + { + handleDuplicate(); + }}> + + Duplicate + + { + handleDelete(); + }}> + + Delete + + + + + + ); +}