'use client'; import React, { type ComponentPropsWithoutRef } from 'react'; import { cn } from '@udecode/cn'; import { useColorsCustom, useColorsCustomState, } from '@udecode/plate-font/react'; import { PlusIcon } from 'lucide-react'; import { buttonVariants } from './button'; import { type TColor, ColorDropdownMenuItems, } from './color-dropdown-menu-items'; import { ColorInput } from './color-input'; // import { ColorInput } from './color-input'; import { DropdownMenuItem } from './dropdown-menu'; type ColorCustomProps = { colors: TColor[]; customColors: TColor[]; updateColor: (color: string) => void; updateCustomColor: (color: string) => void; color?: string; } & ComponentPropsWithoutRef<'div'>; export function ColorCustom({ className, color, colors, customColors, updateColor, updateCustomColor, ...props }: ColorCustomProps) { const state = useColorsCustomState({ color, colors, customColors, updateCustomColor, }); const { inputProps, menuItemProps } = useColorsCustom(state); return (
Custom
); }