Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2827 Rev 2843
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import {
2
import {
3
  FormControl,
3
  FormControl,
4
  InputAdornment,
4
  InputAdornment,
5
  InputBase,
5
  InputBase,
6
  InputLabel,
6
  InputLabel
7
  styled
-
 
8
} from '@mui/material'
7
} from '@mui/material'
9
import { Controller } from 'react-hook-form'
8
import { Controller } from 'react-hook-form'
Línea 10... Línea -...
10
 
-
 
11
import colors from '@styles/colors'
-
 
12
 
9
 
Línea 13... Línea -...
13
import FormErrorFeedback from '../form/FormErrorFeedback'
-
 
14
 
-
 
15
const CustomInput = styled(InputBase)(({ theme }) => ({
-
 
16
  borderRadius: 4,
-
 
17
  position: 'relative',
-
 
18
  backgroundColor: colors.main,
-
 
19
  border: `1px solid var(--border-primary)`,
-
 
20
  fontSize: 14,
-
 
21
  padding: '5px 10px',
-
 
22
  transition: theme.transitions.create([
-
 
23
    'border-color',
-
 
24
    'background-color',
-
 
25
    'box-shadow'
-
 
26
  ]),
-
 
27
  '& .MuiInputBase-input': {
-
 
28
    paddingTop: 0,
-
 
29
    paddingBottom: 0,
-
 
30
    '&::file-selector-button': {
-
 
31
      lineHeight: 1
-
 
32
    }
-
 
33
  },
-
 
34
  '& svg': {
-
 
35
    fontSize: '1.3rem'
-
 
36
  }
-
 
37
}))
10
import FormErrorFeedback from '../form/FormErrorFeedback'
38
 
11
 
39
const Input = ({
12
const Input = ({
40
  name,
13
  name,
41
  control,
14
  control,
Línea 58... Línea 31...
58
        rules={rules}
31
        rules={rules}
59
        render={({ field }) => (
32
        render={({ field }) => (
60
          <FormControl variant='standard' fullWidth>
33
          <FormControl variant='standard' fullWidth>
61
            <InputLabel shrink>{label}</InputLabel>
34
            <InputLabel shrink>{label}</InputLabel>
Línea 62... Línea 35...
62
 
35
 
63
            <CustomInput
36
            <InputBase
64
              {...field}
37
              {...field}
65
              inputProps={{
38
              inputProps={{
66
                accept
39
                accept
67
              }}
40
              }}
Línea 81... Línea 54...
81
 
54
 
82
  return (
55
  return (
83
    <FormControl variant='standard' fullWidth>
56
    <FormControl variant='standard' fullWidth>
Línea 84... Línea 57...
84
      <InputLabel shrink>{label}</InputLabel>
57
      <InputLabel shrink>{label}</InputLabel>
85
 
58
 
86
      <CustomInput
59
      <InputBase
87
        name={name}
60
        name={name}
88
        onChange={onChange}
61
        onChange={onChange}
89
        defaultValue={defaultValue}
62
        defaultValue={defaultValue}