-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCode.jsx
More file actions
45 lines (38 loc) · 1020 Bytes
/
Copy pathCode.jsx
File metadata and controls
45 lines (38 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { useContext } from "react";
import Editor from "./Editor";
import { Box, styled} from '@mui/material';
import { DataContext } from "../Context/DataProvider";
const Container = styled(Box)`
display: flex;
background-color: #060606;
height: 50vh;
`
const Code = () => {
const { html, setHtml, css, setCss, js, setJs } = useContext(DataContext);
return (
<Container>
<Editor
heading="HTML"
icon="/"
color="#FF3C41"
value={html}
onChange={setHtml}
/>
<Editor
heading="CSS"
icon="*"
color="#0EBEFF"
value={css}
onChange={setCss}
/>
<Editor
heading="JAVASCRIPT"
icon="{}"
color="#FCD000"
value={js}
onChange={setJs}
/>
</Container>
)
}
export default Code;