Skip to content

Commit 83b17d3

Browse files
committed
Added a grid layout
1 parent 6d6ec10 commit 83b17d3

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

ksqLight/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Drawer, CssBaseline } from "@mui/material";
88

99
function App() {
1010
const [fetchMetrics, setFetchMetrics] = useState(true);
11-
const [showSettings, setShowSettings] = useState(true);
11+
const [showSettings, setShowSettings] = useState(false);
1212

1313
return (
1414
<BrowserRouter>

ksqLight/src/components/Chart.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from "react";
2+
import { Grid, Typography } from "@mui/material";
3+
4+
export const Chart = ({ content }) => {
5+
6+
return (
7+
<Grid item xs={4}>
8+
<Typography color="primary">{content}</Typography>
9+
</Grid>
10+
)
11+
}

ksqLight/src/components/Homepage.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
import React from "react";
2-
import { Typography, Drawer, Toolbar } from "@mui/material";
3-
import { SettingsSidebar } from "./SettingsSidebar.js";
2+
import { useState } from "react";
3+
import { Typography, Grid, Toolbar } from "@mui/material";
4+
import { Chart } from "./Chart.js";
45

56
export const Homepage = () => {
6-
7+
const [content, setContent] = useState('Content example');
78
return (
89
<div>
910
<Toolbar></Toolbar>
1011
<Typography color="primary">Homepage</Typography>
12+
<Grid container spacing={2} justifyContent="flex-start" alignItems="flex-start">
13+
<Chart content={content}></Chart>
14+
<Chart content={content}></Chart>
15+
<Chart content={content}></Chart>
16+
<Chart content={content}></Chart>
17+
<Chart content={content}></Chart>
18+
<Chart content={content}></Chart>
19+
</Grid>
1120
</div>
1221

1322
)

ksqLight/src/components/SettingsSidebar.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export const SettingsSidebar = ({ showSettings }) => {
3232

3333
return(
3434
<Drawer variant="temporary" anchor="right" open={showSettings}>
35-
<Toolbar></Toolbar>
3635
<div className="flex-1 w-full header-viewport bg-slate-800 p-4">
3736
<form noValidate autoComplete="off">
3837
<Typography variant="h5">Prometheus Connection</Typography>

0 commit comments

Comments
 (0)