refactor(web): remove typescript

This commit is contained in:
Ali BARIN
2024-02-27 15:23:23 +00:00
parent 636870a075
commit b3ae2d2748
337 changed files with 2067 additions and 4997 deletions

View File

@@ -1,16 +1,7 @@
import * as React from 'react';
import { Controller, useFormContext } from 'react-hook-form';
import Checkbox, { CheckboxProps } from '@mui/material/Checkbox';
type ControlledCheckboxProps = {
name: string;
defaultValue?: boolean;
dataTest?: string;
} & Omit<CheckboxProps, 'defaultValue'>;
export default function ControlledCheckbox(
props: ControlledCheckboxProps
): React.ReactElement {
import Checkbox from '@mui/material/Checkbox';
export default function ControlledCheckbox(props) {
const { control } = useFormContext();
const {
required,
@@ -22,7 +13,6 @@ export default function ControlledCheckbox(
dataTest,
...checkboxProps
} = props;
return (
<Controller
rules={{ required }}