Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3509 | Ir a la última revisión | | 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
          variant='search'
18
          autoComplete='off'
19
        />
20
 
21
        <Button color='primary' type='submit'>
22
          Publicar
23
        </Button>
24
      </Box>
25
    </Form>
26
  );
27
}