feat: Extend apps with further data

This commit is contained in:
Ali BARIN
2021-10-10 21:51:16 +02:00
parent 2a01407495
commit 1d65a7c0dd
14 changed files with 93 additions and 26 deletions

View File

@@ -0,0 +1,20 @@
import React from "react";
import { Controller, Control, FieldValues } from "react-hook-form";
import MuiTextField from "@mui/material/TextField";
type TextFieldProps = {
control: Control<FieldValues>;
name: string;
}
export default function TextField({ control, name }: TextFieldProps) {
return (
<Controller
name="MyCheckbox"
control={control}
defaultValue={false}
rules={{ required: true }}
render={({ field }) => <MuiTextField {...field} />}
/>
);
};