Rev 3549 | 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';
import { Form, FormInput } from '@shared/components';
import { FormInputRating } from '.';
export function CapsuleCommentForm({ 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>
}
/>
<FormInputRating name='rating' rules={{ required: 'Este campo es requerido' }} />
</Form>
);
}