File tree Expand file tree Collapse file tree 2 files changed +24
-14
lines changed Expand file tree Collapse file tree 2 files changed +24
-14
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import logo from './logo.svg' ;
3
3
import './App.css' ;
4
+ import Main from './Components/Main'
4
5
5
6
function App ( ) {
6
7
return (
7
8
< 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" />
22
10
</ div >
23
11
) ;
24
12
}
Original file line number Diff line number Diff line change
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 ;
You can’t perform that action at this time.
0 commit comments