File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 "@testing-library/jest-dom" : " ^5.11.4" ,
77 "@testing-library/react" : " ^11.1.0" ,
88 "@testing-library/user-event" : " ^12.1.10" ,
9+ "node-sass" : " ^6.0.1" ,
910 "react" : " ^17.0.2" ,
1011 "react-dom" : " ^17.0.2" ,
12+ "react-icons" : " ^4.3.1" ,
1113 "react-router-dom" : " ^6.0.2" ,
1214 "react-scripts" : " 4.0.3" ,
1315 "web-vitals" : " ^1.0.1"
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+
3+ import { BiMenuAltRight } from "react-icons/bi" ;
4+ import { AiOutlineClose } from "react-icons/ai" ;
5+
6+ import classes from './Header.module.scss' ;
7+
8+
9+
10+ const Header = ( ) => {
11+ return
12+ < header className = { classes . header } >
13+ < div className = { classes . header__content } >
14+
15+ < h2 > navbar</ h2 >
16+ </ div >
17+
18+ < nav className = { classes . header__content__nav } >
19+ < ul >
20+ < li >
21+ < a href = "/" > PageOne</ a >
22+ </ li >
23+ < li >
24+ < a href = "/" > PageOne</ a >
25+ </ li >
26+ < li >
27+ < a href = "/" > PageOne</ a >
28+ </ li >
29+
30+ </ ul >
31+ < button > CTA PAGE</ button >
32+ </ nav >
33+ < div className = { classes . header__content__togle } >
34+
35+
36+ </ div >
37+ </ header > ;
38+ } ;
39+
40+ export default Header ;
Original file line number Diff line number Diff line change 1+ @import ' ./../styles/variables.scss' ;
Original file line number Diff line number Diff line change @@ -4,15 +4,50 @@ import logo1 from "../imgs/logo1.png"
44
55function Utenti ( ) {
66
7+ function Esempio ( ) {
8+ //dichiaro un valore
9+ const [ contatore , setContatore ] = useState ( 0 ) ;
10+ const [ nome , setNome ] = useState ( ) ;
11+
12+
13+ return (
14+ < >
15+ < div className = "contatore" >
16+ < p > Hai clicca { contatore } volte</ p >
17+ < button onClick = { ( ) => setContatore ( contatore + 1 ) } > Clicca qui</ button >
18+ </ div >
19+ < div className = "utenti" >
20+ < p > Tu sei { setNome } </ p >
21+ </ div >
22+ </ >
23+ )
24+ }
25+
26+ function Counter ( { initialCount} ) {
27+ const [ count , setCount ] = useState ( initialCount ) ;
28+ return (
29+ < >
30+ Count: { count }
31+ < button onClick = { ( ) => setCount ( initialCount ) } > Reset</ button >
32+ < button onClick = { ( ) => setCount ( prevCount => prevCount - 1 ) } > -</ button >
33+ < button onClick = { ( ) => setCount ( prevCount => prevCount + 1 ) } > +</ button >
34+ </ >
35+ ) ;
36+ }
37+
38+ function StatusContatore ( props ) {
39+ const [ contatore , setContatore ] = useState ( 0 ) ;
40+ useEffect ( ( ) => {
41+ document . title = 'Hai cliccato $(contatore) volte' ;
42+ } ) ;
43+ }
744
845 return (
946 < div className = "welcome" >
1047 < img src = { logo1 } className = "welcome-logo" alt = "logo" />
11- < h1 > Benvenuto
12-
13-
14-
15- </ h1 >
48+
49+ < h1 > Benvenuto</ h1 >
50+ < h2 > { Esempio ( ) } </ h2 >
1651 </ div >
1752 )
1853}
Original file line number Diff line number Diff line change 1+ @import " ./variables.scss" ;
2+
3+ * {
4+ box-sizing : border-box ;
5+ margin : 0 ;
6+ }
7+
8+ body {
9+ width : 100% ;
10+ font-family : $Poppins ;
11+ color : $dark ;
12+ }
13+
14+ #root {
15+ height : 100% ;
16+ }
Original file line number Diff line number Diff line change 1+ @import url (' https://fonts.googleapis.com/css2?family=Lato&family=Poppins:wght@300;400;600&display=swap' );
2+
3+ $Poppins : " Poppins" , sans-serif ;
4+
5+ // colors
6+ $dark : rgb (29 , 29 , 29 );
7+ $light : #fff ;
8+ $primary : rgb (162 , 162 , 162 );
9+ $gb : rgb (244 , 244 , 255 );
10+
11+ // spacing
12+ $spacing-md : 16px ;
13+ $spacing-lg : 32px ;
14+
15+ // border radius
16+ $borderRadius : 12px ;
17+
18+
19+ // header height
20+ $headerHeight : 100px ;
21+
22+ @mixin breakpoint ($point ) {
23+ @if $point == md {
24+ // 768px
25+ @media (min-width : 48em ) {
26+ @content ;
27+ }
28+ }
29+
30+
31+ }
Original file line number Diff line number Diff line change 11@import url ('https://fonts.googleapis.com/css2?family=Lato&display=swap' );
22* {
3- margin-left : 100 px ;
3+ margin : 0 ;
44
55}
66
99 font-family : 'Lato' , sans-serif;
1010 font-size : 12px ;
1111
12+ }
13+
14+ .welcome h1 {
15+ font-size : 20px ;
16+ margin-left : 80px ;
17+ }
18+
19+ .welcome h2 {
20+ margin-top : 10px ;
21+ margin-left : 80px ;
1222}
You can’t perform that action at this time.
0 commit comments