Extract CheckBox, DateFieldPicker and YesNo wrappers
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import React from "react";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import { Field } from "redux-form";
|
||||
import { RenderCheckBox } from "./renderCheckBox";
|
||||
|
||||
export function CheckBoxfield(props) {
|
||||
const router = useRouter();
|
||||
let { t } = useTranslation();
|
||||
|
||||
const fieldOptions =
|
||||
router.locale == "cy" ? ["Ydw", "Na", "2323"] : ["Yes", "No", "23232"];
|
||||
|
||||
return (
|
||||
<Field
|
||||
name={props.name}
|
||||
datafieldname={props.datafieldname}
|
||||
label={props.label}
|
||||
options={fieldOptions}
|
||||
id={props.id}
|
||||
className={props.className}
|
||||
errorMsg={t("newappeal:select-an-option-label")}
|
||||
component={RenderCheckBox}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user