-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4c15d1
commit 91a4e98
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import { Outline, Input as StyledInput } from './style'; | ||
|
||
export enum IconType { | ||
Sucess = 'success', | ||
Failure = 'failure', | ||
} | ||
|
||
interface IInputElementProps { | ||
maxLength: number; | ||
minLength: number; | ||
max: number; | ||
min: number; | ||
placeholder?: string; | ||
value: string; | ||
} | ||
|
||
interface IProps extends IInputElementProps { | ||
type: 'text' | 'number'; | ||
style?: React.CSSProperties; | ||
} | ||
|
||
const Input: React.FC<IProps> = (props) => { | ||
return ( | ||
<Outline> | ||
<StyledInput {...props} /> | ||
</Outline> | ||
); | ||
}; | ||
|
||
Input.defaultProps = { | ||
type: 'text', | ||
}; | ||
|
||
export { Input }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Outline = styled.div``; | ||
|
||
export const Input = styled.input` | ||
outline: none; | ||
width: 100%; | ||
&:-moz-ui-invalid { | ||
box-shadow: none !important; | ||
} | ||
`; |