File tree 2 files changed +71
-10
lines changed
2 files changed +71
-10
lines changed Original file line number Diff line number Diff line change
1
+ body {
2
+ overflow : hidden;
3
+ }
1
4
.App {
2
5
display : flex;
3
6
justify-content : center;
15
18
font-size : 2rem ;
16
19
letter-spacing : 10px ;
17
20
}
18
- .App .Inc-btn {
21
+ .App .btn-group {
22
+ display : flex;
23
+ width : 80vh ;
24
+ justify-content : space-around;
25
+ }
26
+ .App .btn-group .Inc-btn ,
27
+ .App .btn-group .Dec-btn {
19
28
font-size : 1rem ;
20
29
font-weight : 600 ;
21
30
padding : 1rem ;
22
- width : 10rem ;
23
31
letter-spacing : 3px ;
24
32
cursor : pointer;
33
+ width : 40% ;
34
+ }
35
+ @media only screen and (max-width : 1000px ) {
36
+ .App .App-Name {
37
+ font-size : 2rem ;
38
+ }
39
+ .App .Current-State {
40
+ font-size : 1.7rem ;
41
+ }
42
+ }
43
+ @media only screen and (max-width : 510px ) {
44
+ .App .btn-group {
45
+ width : 50vh ;
46
+ }
47
+ .App .btn-group .Inc-btn ,
48
+ .App .btn-group .Dec-btn {
49
+ font-size : 1rem ;
50
+ font-weight : 600 ;
51
+ padding : 0.5rem ;
52
+ letter-spacing : 3px ;
53
+ cursor : pointer;
54
+ width : 40% ;
55
+ }
56
+ }
57
+ @media only screen and (max-width : 308px ) {
58
+ .App .App-Name {
59
+ font-size : 1.3rem ;
60
+ }
61
+ .App .Current-State {
62
+ font-size : 1rem ;
63
+ }
64
+ .App .btn-group {
65
+ flex-direction : column;
66
+ justify-content : center;
67
+ align-items : center;
68
+ }
69
+ .App .btn-group > button {
70
+ margin : 5px 0px ;
71
+ }
25
72
}
Original file line number Diff line number Diff line change 1
1
import "./App.css" ;
2
- import Increment from "./redux/actions/counter.action.js" ;
2
+ import React from "react" ;
3
+ // import Increment from "./redux/actions/counter.action.js";
3
4
import { useSelector , useDispatch } from "react-redux" ;
4
5
function App ( ) {
5
6
const counter = useSelector ( ( store ) => store . counter ) ;
6
7
const trigger = useDispatch ( ) ;
7
8
return (
8
- < div className = "App" >
9
- < h1 className = "App-Name" > CounterApp</ h1 >
10
- < h3 className = "Current-State" > Counter: { counter } </ h3 >
11
- < button onClick = { ( ) => trigger ( Increment ) } className = "Inc-btn" >
12
- Increment
13
- </ button >
14
- </ div >
9
+ < React . Fragment >
10
+ < div className = "App" >
11
+ < h1 className = "App-Name" > CounterApp</ h1 >
12
+ < h3 className = "Current-State" > Counter: { counter } </ h3 >
13
+ < div className = "btn-group" >
14
+ < button
15
+ onClick = { ( ) => trigger ( { type : "INCREMENT" } ) }
16
+ className = "Inc-btn"
17
+ >
18
+ Increment
19
+ </ button >
20
+ < button
21
+ onClick = { ( ) => trigger ( { type : "DECREMENT" } ) }
22
+ className = "Dec-btn"
23
+ >
24
+ Decrement
25
+ </ button >
26
+ </ div >
27
+ </ div >
28
+ </ React . Fragment >
15
29
) ;
16
30
}
17
31
You can’t perform that action at this time.
0 commit comments