import React from 'react' import { useUserConfigs } from '@hooks/useUserConfigs' import { motion as m } from 'framer-motion' import { twMerge } from 'tailwind-merge' type AccentOption = { value: Accent class: string } const accentOptions: AccentOption[] = [ { value: 'accent-blue', class: 'bg-blue-500', }, { value: 'accent-red', class: 'bg-red-500', }, { value: 'accent-green', class: 'bg-green-500', }, { value: 'accent-orange', class: 'bg-orange-500', }, ] const ToggleAccent = () => { const [config, setUserConfig] = useUserConfigs() const handleChangeAccent = (accent: Accent) => { setUserConfig({ ...config, accent }) } return (
{accentOptions.map((option, i) => { const isActive = config.accent === option.value return (
) })}
) } export default ToggleAccent