Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3509 | Rev 3536 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

import React from 'react';
import { useSelector } from 'react-redux';
import { Box, IconButton } from '@mui/material';
import { Send } from '@mui/icons-material';

import { Form, FormInput } from '../form';

export function CommentForm({ onSubmit = () => {} }) {
  const labels = useSelector(({ intl }) => intl.labels);

  return (
    <Form onSubmit={onSubmit}>
      <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
        <FormInput
          name='comment'
          placeholder={labels.write_a_comment}
          rules={{ required: 'Este campo es requerido' }}
          autoComplete='off'
        />

        <IconButton color='primary' type='submit'>
          <Send />
        </IconButton>
      </Box>
    </Form>
  );
}