Skip to content

Commit 019138d

Browse files
committed
Initial commit
1 parent 6cf855a commit 019138d

22 files changed

+9533
-11676
lines changed

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"singleQuote": true,
3+
"jsxSingleQuote": true,
4+
"semi": true,
5+
"tabWidth": 2,
6+
"bracketSpacing": true,
7+
"jsxBracketSameLine": false,
8+
"arrowParens": "always",
9+
"trailingComma": "none"
10+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Fetch Forms
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package-lock.json

Lines changed: 0 additions & 11567 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
{
2-
"name": "react-example",
2+
"name": "fetch-forms-react-example",
33
"version": "0.1.0",
4-
"private": true,
4+
"private": false,
55
"dependencies": {
6-
"@testing-library/jest-dom": "^5.16.2",
7-
"@testing-library/react": "^12.1.3",
8-
"@testing-library/user-event": "^13.5.0",
6+
"@fetchforms/react": "^1.0.3",
7+
"antd": "^4.18.7",
8+
"autoprefixer": "^10.4.2",
9+
"dotenv": "^16.0.0",
10+
"postcss": "^8.4.6",
911
"react": "^17.0.2",
1012
"react-dom": "^17.0.2",
13+
"react-router-dom": "^6.2.1",
1114
"react-scripts": "5.0.0",
12-
"web-vitals": "^2.1.4"
15+
"tailwindcss": "^3.0.23"
1316
},
1417
"scripts": {
1518
"start": "react-scripts start",
@@ -19,8 +22,7 @@
1922
},
2023
"eslintConfig": {
2124
"extends": [
22-
"react-app",
23-
"react-app/jest"
25+
"react-app"
2426
]
2527
},
2628
"browserslist": {

public/index.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
content="Web site created using create-react-app"
1111
/>
1212
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13-
<!--
14-
manifest.json provides metadata used when your web app is installed on a
15-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16-
-->
17-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
1813
<!--
1914
Notice the use of %PUBLIC_URL% in the tags above.
2015
It will be replaced with the URL of the `public` folder during the build.
@@ -24,7 +19,7 @@
2419
work correctly both with client-side routing and a non-root public URL.
2520
Learn how to configure a non-root public URL by running `npm run build`.
2621
-->
27-
<title>React App</title>
22+
<title>Fetch Forms React Example</title>
2823
</head>
2924
<body>
3025
<noscript>You need to enable JavaScript to run this app.</noscript>

public/logo192.png

-1.17 KB
Loading

public/logo512.png

1.92 KB
Loading

public/manifest.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/App.js

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
1-
import logo from './logo.svg';
2-
import './App.css';
1+
import { BrowserRouter, Routes, Route } from 'react-router-dom';
2+
import ManagedForm from './examples/fetchForm/ManagedForm';
3+
import CustomForm from './examples/customForm/Parent';
4+
import Layout from './examples/components/Layout';
35

46
function App() {
57
return (
6-
<div className="App">
7-
<header className="App-header">
8-
<img src={logo} className="App-logo" alt="logo" />
9-
<p>
10-
Edit <code>src/App.js</code> and save to reload.
11-
</p>
12-
<a
13-
className="App-link"
14-
href="https://reactjs.org"
15-
target="_blank"
16-
rel="noopener noreferrer"
17-
>
18-
Learn React
19-
</a>
20-
</header>
21-
</div>
8+
<BrowserRouter>
9+
<Routes>
10+
<Route path='/' element={<Layout />}>
11+
<Route index element={<ManagedForm />} />
12+
<Route path='custom-form' element={<CustomForm />} />
13+
</Route>
14+
</Routes>
15+
</BrowserRouter>
2216
);
2317
}
2418

src/App.test.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)