import { useTranslation } from "@termix/plugin-sdk/frontend"; import { Input, Textarea } from "@termix/plugin-sdk/ui"; import type { TextBannerConfig, TextBannerFontSize, TextBannerAlign, TextBannerWeight, WidgetEditFormProps, } from "../types.js"; const SIZES: { id: TextBannerFontSize; label: string }[] = [ { id: "sm", label: "SM" }, { id: "md", label: "MD" }, { id: "lg", label: "LG" }, { id: "xl", label: "XL" }, ]; const ALIGNS: { id: TextBannerAlign; label: string }[] = [ { id: "left", label: "Left" }, { id: "center", label: "Center" }, { id: "right", label: "Right" }, ]; const WEIGHTS: { id: TextBannerWeight; label: string }[] = [ { id: "normal", label: "Normal" }, { id: "semibold", label: "Semibold" }, { id: "bold", label: "Bold" }, ]; export function TextBannerEditForm({ config, onChange, }: WidgetEditFormProps) { const { t } = useTranslation(); const ButtonGroup = ({ opts, value, onSelect, }: { opts: { id: T; label: string }[]; value: T; onSelect: (v: T) => void; }) => (
{opts.map((o) => ( ))}
); return (