Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3459 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3459 Rev 3719
Línea 1... Línea 1...
1
import React from 'react';
1
import React from 'react';
2
import { InputAdornment, InputBase } from '@mui/material';
2
import { InputAdornment, InputBase } from '@mui/material';
3
 
3
 
4
export function Input({ name, color, defaultValue, onChange, value, icon, sx, ...props }) {
4
export function Input({
-
 
5
  name,
-
 
6
  color,
-
 
7
  defaultValue,
-
 
8
  onChange,
-
 
9
  value,
-
 
10
  icon,
-
 
11
  endAdornment,
-
 
12
  sx,
-
 
13
  ...props
-
 
14
}) {
5
  return (
15
  return (
6
    <InputBase
16
    <InputBase
-
 
17
      autoComplete='off'
7
      name={name}
18
      name={name}
8
      onChange={onChange}
19
      onChange={onChange}
9
      defaultValue={defaultValue}
20
      defaultValue={defaultValue}
10
      value={value}
21
      value={value}
11
      color={color}
22
      color={color}
12
      startAdornment={icon && <InputAdornment>{icon}</InputAdornment>}
23
      startAdornment={icon && <InputAdornment position='start'>{icon}</InputAdornment>}
-
 
24
      endAdornment={endAdornment && <InputAdornment position='end'>{endAdornment}</InputAdornment>}
13
      fullWidth
25
      fullWidth
14
      sx={sx}
26
      sx={sx}
15
      {...props}
27
      {...props}
16
    />
28
    />
17
  );
29
  );
18
}
30
}