Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3628 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3628 Rev 3719
Línea 1... Línea 1...
1
import React from 'react';
1
import React from 'react';
2
import { Button } from '@mui/material';
2
import { Button } from '@mui/material';
3
import { useFormContext } from 'react-hook-form';
3
import { useFormContext } from 'react-hook-form';
4
 
4
 
5
export const FormButton = ({ type = 'submit', children, ...props }) => {
5
export const FormButton = ({ type = 'submit', children, ...props }) => {
6
  const { isSubmitting } = useFormContext();
6
  const { isSubmitting } = useFormContext();
7
 
7
 
8
  return (
8
  return (
9
    <Button type={type} {...props} disabled={isSubmitting} variant='contained' color='primary'>
9
    <Button type={type} {...props} disabled={isSubmitting} variant='contained' color='primary'>
10
      {children}
10
      {children}
11
    </Button>
11
    </Button>
12
  );
12
  );
13
};
13
};