Skip to content

Commit ce2e8de

Browse files
committed
Updated styling
1 parent c9fae04 commit ce2e8de

File tree

6 files changed

+39
-27
lines changed

6 files changed

+39
-27
lines changed

client/src/components/CodeEditor/CodeEditor.jsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const languageCommentsMap = new Map([
1010
["javascript", "// Paste/Enter your code here"],
1111
["python", "# Paste/Enter your code here"],
1212
["java", "// Paste/Enter your code here"],
13+
["c++", "// Paste/Enter your code here"],
1314
["html", "<!-- Paste/Enter your code here -->"],
1415
["css", "/* Paste/Enter your code here */"],
1516
["ruby", "# Paste/Enter your code here"],
@@ -128,6 +129,18 @@ export default function CodeEditor({ defaultCode }) {
128129
label: "Python",
129130
action: () => handleDropdownClick("python"),
130131
},
132+
{
133+
label: "C++",
134+
action: () => handleDropdownClick("c++"),
135+
},
136+
{
137+
label: "Java",
138+
action: () => handleDropdownClick("java"),
139+
},
140+
{
141+
label: "Ruby",
142+
action: () => handleDropdownClick("ruby"),
143+
},
131144
]}
132145
/>
133146
</div>
@@ -146,7 +159,7 @@ export default function CodeEditor({ defaultCode }) {
146159
onValidate={handleEditorValidation}
147160
/>
148161

149-
<QueryButtons handleClick={handleGenerate} containerWidth={"100%"} />
162+
<QueryButtons handleClick={handleGenerate} />
150163
</>
151164
);
152165
}

client/src/components/Navbar/Navbar.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ export default function Navbar() {
8888
},
8989
}}
9090
>
91-
<MenuItem onClick={handleClose}>
91+
<MenuItem
92+
onClick={() => {
93+
handleClose();
94+
navigate("/profile");
95+
}}
96+
>
9297
<Typography
9398
sx={{
9499
color: "var(--color-accent)",

client/src/components/PromptInput/PromptInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default function PromptInput() {
130130
<input type="file" hidden onChange={handleFileUpload} />
131131
</Button>
132132

133-
<QueryButtons handleClick={handleSubmit} containerWidth={"100%"} />
133+
<QueryButtons handleClick={handleSubmit} />
134134
</div>
135135
);
136136
}

client/src/components/QueryButtons/QueryButtons.jsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import Stack from "@mui/material/Stack";
33
import { useState } from "react";
44
import { useSelector } from "react-redux";
55

6-
export default function QueryButtons({ handleClick, containerWidth }) {
6+
export default function QueryButtons({ handleClick }) {
77
const loading = useSelector((state) => state.loading);
88

99
return (
1010
<Stack
11+
width="100%"
1112
justifyContent="space-between"
1213
direction="row"
13-
width={containerWidth}
1414
marginTop={2}
1515
>
1616
<Button
@@ -21,11 +21,7 @@ export default function QueryButtons({ handleClick, containerWidth }) {
2121
}}
2222
disabled={loading}
2323
>
24-
Generate
25-
</Button>
26-
27-
<Button variant="contained" color="error" disabled={!loading}>
28-
Cancel
24+
{loading ? "Loading..." : "Generate"}
2925
</Button>
3026
</Stack>
3127
);

client/src/index.css

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
/* IBM Plex Mono */
2-
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');
2+
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");
33

44
/* Spectral */
5-
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');
5+
@import url("https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap");
66

77
/* Roboto */
8-
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
8+
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
99

1010
:root {
11-
--color-primary: #0f434c;
12-
--color-secondary: #0c7489;
13-
--color-tertiary: #119da4;
14-
--color-accent: #d7d9ce;
15-
--color-dark: #1c1c1c;
16-
17-
--color-test: #194f58;
11+
--color-primary: #0f434c;
12+
--color-secondary: #0c7489;
13+
--color-tertiary: #119da4;
14+
--color-accent: #d7d9ce;
15+
--color-dark: #1c1c1c;
16+
--color-test: #194f58;
17+
--color-white: #fff;
1818
}
1919

2020
body {
21-
font-family: Arial, sans-serif;
22-
background-color: var(--color-primary);
23-
color: var(--color-accent);
24-
margin: 0;
21+
font-family: Arial, sans-serif;
22+
background-color: var(--color-primary);
23+
color: var(--color-accent);
24+
margin: 0;
2525
}

client/src/pages/QueryPage.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ export default function QueryPage() {
1616
<>
1717
<Navbar />
1818
<div style={{ marginTop: "6rem" }}>
19-
<h1 style={{ textAlign: "center" }}>Monaco Editor Example</h1>
20-
21-
<div style={{ textAlign: "center", marginTop: "1rem" }}>
19+
<div style={{ textAlign: "center" }}>
2220
<Button variant="contained" color="info" onClick={toggleEditor}>
2321
Toggle Editor
2422
</Button>

0 commit comments

Comments
 (0)