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:
parent
6168841f78
commit
9528e7f699
27 changed files with 528 additions and 96 deletions
38
src/components/input/TextInput/index.tsx
Normal file
38
src/components/input/TextInput/index.tsx
Normal 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>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue