import { useContext, Fragment } from "react"; import { IoColorPalette } from "react-icons/io5"; import { Popover, Transition } from "@headlessui/react"; import classNames from "classnames"; import { ColorContext } from "utils/contexts/color"; const colors = [ "slate", "gray", "zinc", "neutral", "stone", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "red", "white", ]; export default function ColorToggle() { const { color: active, setColor } = useContext(ColorContext); if (!active) { return null; } return (
{colors.map((color) => ( ))}
); }