Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3508 | Rev 3535 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3508 stevensc 1
import React from 'react';
2
import { useSelector } from 'react-redux';
3
import { Box, Button } from '@mui/material';
4
 
5
import { Form, FormInput } from '../form';
6
 
7
export function CommentForm({ onSubmit = () => {} }) {
8
  const labels = useSelector(({ intl }) => intl.labels);
9
 
10
  return (
11
    <Form onSubmit={onSubmit}>
12
      <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
13
        <FormInput
14
          name='comment'
15
          placeholder={labels.write_a_comment}
16
          rules={{ required: 'Este campo es requerido' }}
17
          autoComplete='off'
18
        />
19
 
20
        <Button color='primary' type='submit'>
21
          Publicar
22
        </Button>
23
      </Box>
24
    </Form>
25
  );
26
}