Skip to content

Commit 57345b2

Browse files
committed
add support for success status blocks
1 parent 3cf6997 commit 57345b2

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

src/client/src/components/BugAlert.jsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ const StyledButton = styled(Button)({
1717
marginRight: "1rem",
1818
});
1919

20-
export default function BugAlert({ title = null, type, message, flags = [], panel, square = false, width = null }) {
20+
export default function BugAlert({
21+
title = null,
22+
type,
23+
message,
24+
flags = [],
25+
panel,
26+
square = false,
27+
width = null,
28+
sx = {},
29+
}) {
2130
const navigate = useNavigate();
2231
const sendAlert = useAlert();
2332

@@ -26,6 +35,7 @@ export default function BugAlert({ title = null, type, message, flags = [], pane
2635
warning: "Warning",
2736
info: "Info",
2837
error: "Error",
38+
success: "Status",
2939
};
3040

3141
const mappedSeverity = {
@@ -139,6 +149,7 @@ export default function BugAlert({ title = null, type, message, flags = [], pane
139149
"& .MuiAlert-message": {
140150
paddingRight: "4px",
141151
},
152+
...sx,
142153
}}
143154
severity={mappedSeverity[type]}
144155
>

src/client/src/components/panels/PanelStatus.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default function PanelStatus({ statusItems, panel }) {
1212
flags={eachItem.flags}
1313
panel={panel}
1414
square
15+
sx={{ borderBottomStyle: "solid", borderBottomWidth: "1px", borderBottomColor: "border.bold" }}
1516
/>
1617
))}
1718
</div>

src/client/src/theme.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const theme = (selectedTheme = "dark") => {
6363
border: {
6464
light: "#181818",
6565
medium: "#3c3c3c",
66+
bold: "#505050",
6667
heavy: "#a2a2a2",
6768
},
6869

@@ -407,6 +408,13 @@ const theme = (selectedTheme = "dark") => {
407408
color: "#fff",
408409
},
409410
},
411+
standardSuccess: {
412+
color: "#dff7d6",
413+
backgroundColor: "#05990c",
414+
"& .MuiAlert-icon": {
415+
color: "#fff",
416+
},
417+
},
410418
},
411419
},
412420
MuiPickersLayout: {

0 commit comments

Comments
 (0)