import { useTranslation } from "@termix/plugin-sdk/frontend"; import { Input } from "@termix/plugin-sdk/ui"; import type { FolderConfig, WidgetEditFormProps } from "../types.js"; function getAccentColor(): string { return ( getComputedStyle(document.documentElement) .getPropertyValue("--accent-brand") .trim() || "#f59145" ); } export function FolderEditForm({ config, onChange, }: WidgetEditFormProps) { const { t } = useTranslation(); const accent = getAccentColor(); return (
onChange({ ...config, color: e.target.value })} className="w-8 h-8 border border-border cursor-pointer" /> onChange({ ...config, color: e.target.value || undefined }) } placeholder={accent} className="h-8 text-sm flex-1" />
); }