import * as React from "react"; import { SendouSwitch } from "~/components/elements/Switch"; import type { FormFieldProps } from "../types"; import { FormFieldMessages, useTranslatedTexts } from "./FormFieldWrapper"; type SwitchFormFieldProps = Omit, "onBlur"> & { checked: boolean; onChange: (checked: boolean) => void; isDisabled?: boolean; }; export function SwitchFormField({ name, label, bottomText, error, checked, onChange, isDisabled, }: SwitchFormFieldProps) { const id = React.useId(); const { translatedLabel } = useTranslatedTexts({ label }); return (
{translatedLabel}
); }