Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3548 | 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 { IconButton } from '@mui/material';
import SendRounded from '@mui/icons-material/SendRounded';

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

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

  return (
    <Form onSubmit={onSubmit}>
      <FormInput
        name='comment'
        placeholder={labels.write_a_comment}
        rules={{ required: 'Este campo es requerido' }}
        autoComplete='off'
        endAdornment={
          <IconButton type='submit' sx={{ padding: 0.4 }}>
            <SendRounded />
          </IconButton>
        }
      />
    </Form>
  );
}