Skip to content

Commit 1d8a885

Browse files
committed
react initial commit
1 parent a07289b commit 1d8a885

File tree

9 files changed

+17082
-0
lines changed

9 files changed

+17082
-0
lines changed

JavaScript/impl-react/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

JavaScript/impl-react/package-lock.json

Lines changed: 16974 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

JavaScript/impl-react/package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "impl-react",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"react": "^16.7.0",
7+
"react-dom": "^16.7.0",
8+
"react-scripts": "2.1.3"
9+
},
10+
"scripts": {
11+
"start": "react-scripts start",
12+
"build": "react-scripts build",
13+
"test": "react-scripts test",
14+
"eject": "react-scripts eject"
15+
},
16+
"eslintConfig": {
17+
"extends": "react-app"
18+
},
19+
"browserslist": [
20+
">0.2%",
21+
"not dead",
22+
"not ie <= 11",
23+
"not op_mini all"
24+
]
25+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta
6+
name="viewport"
7+
content="width=device-width, initial-scale=1, shrink-to-fit=no"
8+
/>
9+
<meta name="theme-color" content="#000000" />
10+
<!--
11+
Notice the use of %PUBLIC_URL% in the tags above.
12+
It will be replaced with the URL of the `public` folder during the build.
13+
Only files inside the `public` folder can be referenced from the HTML.
14+
15+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
16+
work correctly both with client-side routing and a non-root public URL.
17+
Learn how to configure a non-root public URL by running `npm run build`.
18+
-->
19+
<title>React App</title>
20+
</head>
21+
<body>
22+
<noscript>You need to enable JavaScript to run this app.</noscript>
23+
<div id="root"></div>
24+
<!--
25+
This HTML file is a template.
26+
If you open it directly in the browser, you will see an empty page.
27+
28+
You can add webfonts, meta tags, or analytics to this file.
29+
The build step will place the bundled scripts into the <body> tag.
30+
31+
To begin the development, run `npm start` or `yarn start`.
32+
To create a production bundle, use `npm run build` or `yarn build`.
33+
-->
34+
</body>
35+
</html>

JavaScript/impl-react/src/Components/App.css

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React, { Component } from 'react';
2+
import './App.css';
3+
import { formConfig } from '../FormBuilder/formConfig.js';
4+
5+
export class App extends Component {
6+
render() {
7+
return (
8+
<div className="App">
9+
<pre>{JSON.stringify(formConfig)}</pre>
10+
</div>
11+
);
12+
}
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export const formConfig = [
2+
{type: 'text', label: 'Email', pattern: '^.*@.*$'},
3+
{type: 'secret', label: 'Password', minLength: 8},
4+
{type: 'secret', label: 'Repeat', minLength: 8},
5+
{type: 'submit', label: 'Login'},
6+
];

JavaScript/impl-react/src/index.css

Whitespace-only changes.

JavaScript/impl-react/src/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import './index.css';
4+
import { App } from './Components/App';
5+
6+
ReactDOM.render(<App />, document.getElementById('root'));

0 commit comments

Comments
 (0)