1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-01 23:56:41 +07:00

login mechanism

This commit is contained in:
muerwre 2019-04-04 16:36:50 +07:00
parent 6168841f78
commit 9528e7f699
27 changed files with 528 additions and 96 deletions

View file

@ -0,0 +1,38 @@
import * as React from 'react';
const style = require('./style.scss');
interface ITextInputProps {
type?: 'text' | 'password',
placeholder?: string,
label?: string,
value?: string,
onChange: React.ChangeEventHandler,
}
export const TextInput: React.FunctionComponent<ITextInputProps> = ({
type = 'text',
placeholder = '',
label,
onChange = () => {},
value='',
}) => (
<div
className={style.wrapper}
>
{
label &&
<div className={style.label}>{label}</div>
}
<div className={style.container}>
<input
placeholder={placeholder}
className={style.input}
type={type}
onChange={onChange}
value={value}
/>
</div>
</div>
);