feat: Extend apps with further data
This commit is contained in:
20
packages/web/src/components/TextField/index.tsx
Normal file
20
packages/web/src/components/TextField/index.tsx
Normal 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} />}
|
||||
/>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user