Rev 3628 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react';
import { IconButton } from '@mui/material';
import { AttachFile, SendRounded } from '@mui/icons-material';
import { Form, FormHiddenInput, FormInput } from '@shared/components';
export const ChatForm = ({ onSubmit }) => {
return (
<Form defaultValues={{ message: '' }} reset onSubmit={onSubmit}>
<IconButton component='label' role={undefined} variant='contained' tabIndex={-1}>
<AttachFile />
<FormHiddenInput name='file' type='file' />
</IconButton>
<FormInput
name='message'
placeholder='Escribe un mensaje'
rules={{ required: true }}
autoComplete='off'
endAdornment={
<IconButton type='submit' sx={{ padding: 0.4 }}>
<SendRounded />
</IconButton>
}
/>
</Form>
);
};