Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3537 | Rev 3694 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3537 Rev 3548
Línea 1... Línea 1...
1
import React from 'react';
1
import React from 'react';
2
import { useSelector } from 'react-redux';
2
import { useSelector } from 'react-redux';
3
import { Box, IconButton } from '@mui/material';
3
import { IconButton } from '@mui/material';
4
import { SendRounded } from '@mui/icons-material';
4
import { SendRounded } from '@mui/icons-material';
Línea 5... Línea 5...
5
 
5
 
Línea 6... Línea 6...
6
import { Form, FormInput } from '../form';
6
import { Form, FormInput } from '../form';
7
 
7
 
Línea 8... Línea 8...
8
export function CommentForm({ onSubmit = () => {} }) {
8
export function CommentForm({ onSubmit = () => {} }) {
9
  const labels = useSelector(({ intl }) => intl.labels);
9
  const labels = useSelector(({ intl }) => intl.labels);
10
 
-
 
11
  return (
10
 
12
    <Form onSubmit={onSubmit}>
11
  return (
13
      <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
12
    <Form onSubmit={onSubmit}>
14
        <FormInput
13
      <FormInput
15
          name='comment'
14
        name='comment'
16
          placeholder={labels.write_a_comment}
15
        placeholder={labels.write_a_comment}
17
          rules={{ required: 'Este campo es requerido' }}
16
        rules={{ required: 'Este campo es requerido' }}
18
          autoComplete='off'
17
        autoComplete='off'
19
          endAdornment={
18
        endAdornment={
20
            <IconButton type='submit' sx={{ padding: 0.4 }}>
19
          <IconButton type='submit' sx={{ padding: 0.4 }}>
21
              <SendRounded />
20
            <SendRounded />
22
            </IconButton>
-
 
23
          }
21
          </IconButton>
24
        />
22
        }
25
      </Box>
23
      />