Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3238 Rev 3435
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react';
2
import {
-
 
3
  FormControl,
-
 
4
  InputAdornment,
-
 
5
  InputBase,
-
 
6
  InputLabel
-
 
7
} from '@mui/material'
2
import { FormControl, InputAdornment, InputBase, InputLabel } from '@mui/material';
8
import { Controller } from 'react-hook-form'
3
import { Controller } from 'react-hook-form';
Línea 9... Línea 4...
9
 
4
 
Línea 10... Línea 5...
10
import FormErrorFeedback from '../form/FormErrorFeedback'
5
import FormErrorFeedback from '../form/FormErrorFeedback';
11
 
6
 
12
const Input = ({
7
const Input = ({
-
 
8
  name,
13
  name,
9
  control,
14
  control,
10
  color,
15
  label,
11
  label,
16
  rules,
12
  rules,
17
  defaultValue,
13
  defaultValue,
Línea 29... Línea 25...
29
        name={name}
25
        name={name}
30
        control={control}
26
        control={control}
31
        defaultValue={defaultValue}
27
        defaultValue={defaultValue}
32
        rules={rules}
28
        rules={rules}
33
        render={({ field }) => (
29
        render={({ field }) => (
34
          <FormControl variant='standard' fullWidth sx={style}>
30
          <FormControl variant='standard' color={color} fullWidth sx={style}>
35
            {label && <InputLabel shrink>{label}</InputLabel>}
31
            {label && <InputLabel shrink>{label}</InputLabel>}
Línea 36... Línea 32...
36
 
32
 
37
            <InputBase
33
            <InputBase
38
              {...field}
34
              {...field}
39
              inputProps={{
35
              inputProps={{
40
                accept
36
                accept
41
              }}
-
 
42
              startAdornment={
37
              }}
43
                icon ? <InputAdornment>{icon}</InputAdornment> : null
-
 
44
              }
38
              startAdornment={icon ? <InputAdornment>{icon}</InputAdornment> : null}
45
              fullWidth
39
              fullWidth
46
              {...props}
40
              {...props}
Línea 47... Línea 41...
47
            />
41
            />
48
 
42
 
49
            {error ? <FormErrorFeedback>{error}</FormErrorFeedback> : null}
43
            {error ? <FormErrorFeedback>{error}</FormErrorFeedback> : null}
50
          </FormControl>
44
          </FormControl>
51
        )}
45
        )}
52
      />
46
      />
Línea 53... Línea 47...
53
    )
47
    );
54
  }
48
  }
55
 
49
 
Línea 70... Línea 64...
70
        {...props}
64
        {...props}
71
      />
65
      />
Línea 72... Línea 66...
72
 
66
 
73
      {error ? <FormErrorFeedback>{error}</FormErrorFeedback> : null}
67
      {error ? <FormErrorFeedback>{error}</FormErrorFeedback> : null}
74
    </FormControl>
68
    </FormControl>
75
  )
69
  );
Línea 76... Línea 70...
76
}
70
};