Proyectos de Subversion LeadersLinked - SPA

Rev

Autoría | Ultima modificación | Ver Log |

import React from 'react'
import { InputAdornment, InputLabel } from '@mui/material'

import InputBase from './InputBase'

const TextInput = ({
  label = '',
  inputRef = null,
  icon: Icon = null,
  ...rest
}) => {
  return (
    <>
      {label ? (
        <InputLabel shrink htmlFor={name}>
          {label}
        </InputLabel>
      ) : null}

      <InputBase
        ref={inputRef}
        startAdornment={
          Icon ? (
            <InputAdornment position='start'>
              <Icon />
            </InputAdornment>
          ) : null
        }
        fullWidth
        {...rest}
      />
    </>
  )
}

export default TextInput