Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cola119 committed Jun 6, 2019
1 parent e0813b6 commit e9084b7
Show file tree
Hide file tree
Showing 6 changed files with 1,074 additions and 1,017 deletions.
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "es5"
}
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.0.2",
"@material-ui/icons": "^4.0.1",
"@types/jest": "24.0.13",
"@types/node": "12.0.4",
"@types/node": "12.0.5",
"@types/react": "16.8.19",
"@types/react-dom": "16.8.4",
"react": "^16.8.6",
Expand All @@ -21,6 +23,13 @@
"eslintConfig": {
"extends": "react-app"
},
"devDependencies": {
"prettier": "^1.17.1",
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"tslint-react": "^4.0.0"
},
"browserslist": {
"production": [
">0.2%",
Expand Down
35 changes: 35 additions & 0 deletions src/components/Atoms/TextInput.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react';
import TextField from '@material-ui/core/TextField';

interface IProps {
name: string;
type?: 'password' | 'email' | 'text';
autoFocus: boolean;
label: string;
placeholder: string;
value: string;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
}

const TextInput: React.FC<IProps> = props => {
return (
<TextField
required={true}
name={props.name}
type={props.type || 'text'}
autoFocus={props.autoFocus}
label={props.label}
placeholder={props.placeholder}
fullWidth={true}
margin="normal"
variant="outlined"
InputLabelProps={{
shrink: true,
}}
onChange={props.onChange}
value={props.value}
/>
);
};

export default TextInput;
10 changes: 2 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
Expand All @@ -19,7 +15,5 @@
"noEmit": true,
"jsx": "preserve"
},
"include": [
"src"
]
"include": ["src"]
}
11 changes: 11 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"],
"rulesDirectory": ["tslint-plugin-prettier"],
"rules": {
"prettier": true,
"interface-name": false,
"no-console": [false],
"ordered-imports": [false],
"object-literal-sort-keys": [false]
}
}
Loading

0 comments on commit e9084b7

Please sign in to comment.