import { forwardRef, type HTMLAttributes } from "react"; import { cn } from "@/lib/utils"; const ColorsWedges = forwardRef< HTMLDivElement, HTMLAttributes & { title: string; } >(({ className, children, title, ...otherProps }, ref) => { return ( {title ? ( {title} • {`wg-${title.toLowerCase()}`} ) : null} {children} ); }); const Color = forwardRef< HTMLDivElement, HTMLAttributes & { title: string; hex: string; } >(({ className, title, hex, ...otherProps }, ref) => { return ( {title} {hex} ); }); const ColorThemable = forwardRef< HTMLDivElement, HTMLAttributes & { title: string; hex: string; } >(({ className, title, hex, ...otherProps }, ref) => { return ( {title} {hex && {hex}} ); }); Color.displayName = "Color"; ColorsWedges.displayName = "Colors"; ColorThemable.displayName = "ColorThemable"; export const Colors = Object.assign(ColorsWedges, { Color, ColorThemable });