import { useTranslation } from "react-i18next"; import { Input } from "@/components/input"; import type { ImageWidgetConfig, WidgetEditFormProps, } from "@/types/homepage-types"; export function ImageWidgetEditForm({ config, onChange, }: WidgetEditFormProps) { const { t } = useTranslation(); return (
onChange({ ...config, imageUrl: e.target.value })} placeholder="https://example.com/image.png" className="h-8 text-xs" />
onChange({ ...config, linkUrl: e.target.value || undefined }) } placeholder="https://example.com" className="h-8 text-xs" />
{(["contain", "cover", "fill"] as const).map((f) => ( ))}
onChange({ ...config, alt: e.target.value || undefined }) } placeholder={t("homepage.altTextPlaceholder")} className="h-8 text-xs" />
); }