Skip to content

Commit ee241ae

Browse files
Added Project
1 parent 96292e1 commit ee241ae

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

src/App.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
11
import React from 'react';
22
import logo from './logo.svg';
33
import './App.css';
4+
import Main from './Components/Main'
45

56
function App() {
67
return (
78
<div className="App">
8-
<header className="App-header">
9-
<img src={logo} className="App-logo" alt="logo" />
10-
<p>
11-
Edit <code>src/App.js</code> and save to reload.
12-
</p>
13-
<a
14-
className="App-link"
15-
href="https://reactjs.org"
16-
target="_blank"
17-
rel="noopener noreferrer"
18-
>
19-
Learn React
20-
</a>
21-
</header>
9+
<Main city="Delhi" animal="Lion" game="Hockey" flower="Lotus" bird="Peacock" />
2210
</div>
2311
);
2412
}

src/Components/Main.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react';
2+
3+
class Main extends React.Component{
4+
render(){
5+
return (
6+
<div>
7+
<h1>General knowledge on INDIA!</h1>
8+
<h2>Question 1:What is the Capital Of India?</h2>
9+
<h2>Answer 1: {this.props.city}</h2>
10+
<h2>Question 2:What is the National Animal Of India?</h2>
11+
<h2>Answer 2: {this.props.animal}</h2>
12+
<h2>Question 3:What is the National Game Of India?</h2>
13+
<h2>Answer 3: {this.props.game}</h2>
14+
<h2>Question 4:What is the National Bird Of India?</h2>
15+
<h2>Answer 4: {this.props.bird}</h2>
16+
<h2>Question 5:What is the National Flower Of India?</h2>
17+
<h2>Answer 5: {this.props.flower}</h2>
18+
19+
</div>)
20+
}
21+
}
22+
export default Main;

0 commit comments

Comments
 (0)