Skip to content

Commit 416f16d

Browse files
committed
Added two basic components: InputComponent and OutputComponent
* each with a heading and a textarea
1 parent b22be9c commit 416f16d

File tree

5 files changed

+49
-3
lines changed

5 files changed

+49
-3
lines changed

src/App.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
import InputComponent from './InputComponent';
2+
import OutputComponent from './OutputComponent';
3+
4+
import React from 'react';
15

26

37

48
function App () {
9+
let inputProps = {};
10+
let outputProps = {};
11+
512
return (
613
<div className="App">
7-
<main className="flex min-h-screen bg-blue-500 text-white">
8-
<h2 className="text-[120px] m-auto">json</h2>
9-
</main>
14+
<InputComponent {...inputProps} />
15+
<OutputComponent {...outputProps} />
1016
</div>
1117
);
1218
}

src/InputComponent/InputComponent.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
3+
4+
export default function InputComponent () {
5+
return (
6+
<div className="InputComponent py-16 bg-slate-300">
7+
<div className="max-w-4xl mx-auto shadow">
8+
<div className="bg-slate-200 px-6 py-4">
9+
<h1 className="text-xl">Input</h1>
10+
</div>
11+
<div className="bg-slate-100 px-4 py-4">
12+
<textarea name="" id="" cols="30" rows="10" className="w-full border-2 border-slate-500"></textarea>
13+
</div>
14+
</div>
15+
</div>
16+
);
17+
}

src/InputComponent/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import InputComponent from './InputComponent';
2+
3+
export default InputComponent;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
3+
4+
export default function OutputComponent () {
5+
return (
6+
<div className="OutputComponent py-16 bg-slate-100">
7+
<div className="max-w-4xl mx-auto shadow">
8+
<div className="bg-slate-200 px-6 py-4">
9+
<h1 className="text-xl">Output</h1>
10+
</div>
11+
<div className="bg-slate-100 px-4 py-4">
12+
<textarea name="" id="" cols="30" rows="10" className="w-full border-2 border-slate-500"></textarea>
13+
</div>
14+
</div>
15+
</div>
16+
);
17+
}

src/OutputComponent/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import OutputComponent from './OutputComponent';
2+
3+
export default OutputComponent;

0 commit comments

Comments
 (0)