You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
963 B
28 lines
963 B
import React from 'react'
|
|
import classNames from 'classnames';
|
|
|
|
interface Props {
|
|
onChange: (value: string, name: string) => void;
|
|
type: string,
|
|
name: string,
|
|
label: string,
|
|
value: string,
|
|
}
|
|
|
|
export const Input: React.FC<Props> = ({type, name, label, onChange, value }) => {
|
|
return(
|
|
<div className={'blocks'}>
|
|
<span className={classNames('input input_filled')}>
|
|
<input className={classNames('input_field input_field_mui')}
|
|
onChange={event => onChange(event.target.value, event.target.name)}
|
|
type={type}
|
|
name={name}
|
|
value={value}/>
|
|
<label className={classNames('input_label input_label_mui')} htmlFor={label}>
|
|
<span className={classNames('input_label_content input_label_content_mui')}>{label}</span>
|
|
</label>
|
|
</span>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
|