Proyectos de Subversion LeadersLinked - SPA

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3736 stevensc 1
import React from 'react';
2
import { FormControlLabel, Checkbox } from '@mui/material';
3
import { Controller, useFormContext } from 'react-hook-form';
4
 
5
export function FormCheckbox({ name, label, ...props }) {
6
  const { control } = useFormContext();
7
 
8
  return (
9
    <Controller
10
      name={name}
11
      control={control}
12
      render={({ field }) => (
13
        <FormControlLabel control={<Checkbox {...field} {...props} />} label={label} />
14
      )}
15
    />
16
  );
17
}