1
- import React from 'react' ;
1
+ import React , { useContext , useEffect , useState } from 'react' ;
2
2
import '../stylesheets/Contact.scss' ;
3
+ import { DashboardContext } from '../context/DashboardContext' ;
4
+ import { lightAndDark } from './Styling' ;
3
5
4
6
const Contact = React . memo ( ( props ) => {
7
+ let { mode } = useContext ( DashboardContext ) ;
8
+
9
+ let currentMode = ( mode === 'light mode' ) ? lightAndDark . lightModeText : lightAndDark . darkModeText ;
10
+
5
11
return (
6
12
< div className = "contact" >
7
13
< div className = "contact-border" >
8
14
< div className = "contact-container" >
9
15
< div className = "contact-blurb" >
10
- < h1 > Contact Us</ h1 >
16
+ < h1 style = { currentMode } > Contact Us</ h1 >
11
17
< br />
12
- < p > Please feel free to provide any feedback, concerns, or comments.</ p >
13
- < p >
18
+ < p style = { currentMode } > Please feel free to provide any feedback, concerns, or comments.</ p >
19
+ < p style = { currentMode } >
14
20
You can find issues the team is currently working on
15
- < a id = "issueLink" href = "https://github.com/open-source-labs/Chronos/issues" target = "_blank" >
21
+ < a style = { currentMode } id = "issueLink" href = "https://github.com/open-source-labs/Chronos/issues" target = "_blank" >
16
22
here
17
23
</ a >
18
24
.
@@ -21,28 +27,28 @@ const Contact = React.memo((props) => {
21
27
</ div >
22
28
< div className = "email-container" >
23
29
< form >
24
- < label htmlFor = "fname" > First Name: </ label >
30
+ < label style = { currentMode } htmlFor = "fname" > First Name: </ label >
25
31
< input type = "text" id = "fname" name = "firstname" placeholder = "Your name.." />
26
32
< br />
27
- < label htmlFor = "lname" > Last Name: </ label >
33
+ < label style = { currentMode } htmlFor = "lname" > Last Name: </ label >
28
34
< input type = "text" id = "lname" name = "lastname" placeholder = "Your last name.." />
29
35
< br />
30
- < label htmlFor = "email" > E-mail: </ label >
36
+ < label style = { currentMode } htmlFor = "email" > E-mail: </ label >
31
37
< input type = "text" id = "email" name = "email" placeholder = "Your e-mail address.." />
32
38
< br />
33
- < label htmlFor = "subject" > Subject: </ label >
39
+ < label style = { currentMode } htmlFor = "subject" > Subject: </ label >
34
40
< input type = "text" id = "subject" name = "subject" placeholder = "Subject" />
35
41
< br />
36
- < label id = "messageLabel" htmlFor = "message" > Message: < span >
42
+ < label style = { currentMode } id = "messageLabel" htmlFor = "message" > Message: < span >
37
43
< textarea id = "message" name = "message" placeholder = "Write something.." > </ textarea >
38
44
</ span >
39
45
</ label >
40
46
41
47
< br />
42
- < label htmlFor = "myfile" > Select a file: </ label >
43
- < input type = "file" id = "myfile" name = "myfile" accept = "image/*" > </ input >
48
+ < label style = { currentMode } htmlFor = "myfile" > Select a file: </ label >
49
+ < input style = { currentMode } type = "file" id = "myfile" name = "myfile" accept = "image/*" > </ input >
44
50
< br />
45
- < input id = "contact-submit" type = "submit" value = "Submit" />
51
+ < input style = { currentMode } id = "contact-submit" type = "submit" value = "Submit" />
46
52
</ form >
47
53
</ div >
48
54
</ div >
0 commit comments