"use client";
import React from "react";
import { cn } from "@/lib/utils";
import { motion } from "framer-motion";
export default function Switch({
allTag,
nowTag,
setTag,
}: {
allTag: string[];
nowTag: string;
setTag: (tag: string) => void;
}) {
return (
{allTag.map((tag) => (
setTag(tag)}
className={cn(
"relative cursor-pointer rounded-3xl px-2.5 py-[8px] text-[13px] font-[600] transition-all duration-500",
nowTag === tag
? "text-black dark:text-white"
: "text-stone-400 dark:text-stone-500",
)}
>
{nowTag === tag && (
)}
))}
);
}