Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3628 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3622 stevensc 1
import React from 'react';
2
import { IconButton } from '@mui/material';
3
import { AttachFile, SendRounded } from '@mui/icons-material';
4
 
5
import { Form, FormHiddenInput, FormInput } from '@shared/components';
6
 
7
export const ChatForm = ({ onSubmit }) => {
8
  return (
9
    <Form defaultValues={{ message: '' }} reset onSubmit={onSubmit}>
10
      <IconButton component='label' role={undefined} variant='contained' tabIndex={-1}>
11
        <AttachFile />
12
        <FormHiddenInput name='file' type='file' />
13
      </IconButton>
14
      <FormInput
15
        name='message'
16
        placeholder='Escribe un mensaje'
17
        rules={{ required: true }}
18
        autoComplete='off'
19
        endAdornment={
20
          <IconButton type='submit' sx={{ padding: 0.4 }}>
21
            <SendRounded />
22
          </IconButton>
23
        }
24
      />
25
    </Form>
26
  );
27
};