Skip to content

Commit 4ab980e

Browse files
committed
feat: update ui for error dialog and snackbar
1 parent 913c0f5 commit 4ab980e

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

site/src/components/ConfirmDialog/ConfirmDialog.tsx

+5-6
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ interface StyleProps {
4848
const useStyles = makeStyles((theme) => ({
4949
dialogWrapper: (props: StyleProps) => ({
5050
"& .MuiPaper-root": {
51-
background: props.type === "info" ? theme.palette.primary.main : theme.palette.error.dark,
51+
background: props.type === "info" ? theme.palette.primary.main : theme.palette.background.paper,
52+
border: `1px solid ${theme.palette.divider}`,
5253
},
5354
}),
5455
dialogContent: (props: StyleProps) => ({
55-
color: props.type === "info" ? theme.palette.primary.contrastText : theme.palette.error.contrastText,
56+
color: props.type === "info" ? theme.palette.primary.contrastText : theme.palette.text.secondary,
5657
padding: theme.spacing(6),
5758
textAlign: "center",
5859
}),
@@ -61,16 +62,14 @@ const useStyles = makeStyles((theme) => ({
6162
},
6263
description: (props: StyleProps) => ({
6364
color:
64-
props.type === "info"
65-
? fade(theme.palette.primary.contrastText, 0.75)
66-
: fade(theme.palette.error.contrastText, 0.75),
65+
props.type === "info" ? fade(theme.palette.primary.contrastText, 0.75) : fade(theme.palette.text.secondary, 0.75),
6766
lineHeight: "160%",
6867

6968
"& strong": {
7069
color:
7170
props.type === "info"
7271
? fade(theme.palette.primary.contrastText, 0.95)
73-
: fade(theme.palette.error.contrastText, 0.95),
72+
: fade(theme.palette.text.secondary, 0.95),
7473
},
7574
}),
7675
}))

site/src/components/Dialog/Dialog.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const DialogActionButtons: React.FC<DialogActionButtonsProps> = ({
114114
})}
115115
disabled={confirmLoading}
116116
onClick={onCancel}
117-
variant="contained"
117+
variant="outlined"
118118
>
119119
{cancelText}
120120
</LoadingButton>
@@ -145,7 +145,7 @@ interface StyleProps {
145145

146146
const useButtonStyles = makeStyles((theme) => ({
147147
dialogButton: {
148-
borderRadius: 0,
148+
borderRadius: theme.shape.borderRadius,
149149
fontSize: theme.typography.h6.fontSize,
150150
fontWeight: theme.typography.h5.fontWeight,
151151
padding: theme.spacing(2.25),

site/src/components/EnterpriseSnackbar/EnterpriseSnackbar.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ const useStyles = makeStyles((theme) => ({
8181
color: theme.palette.error.contrastText,
8282
},
8383
snackbarContent: {
84+
border: `1px solid ${theme.palette.divider}`,
8485
borderLeft: `4px solid ${theme.palette.primary.main}`,
85-
borderRadius: 0,
86+
borderRadius: theme.shape.borderRadius,
8687
padding: `${theme.spacing(1)}px ${theme.spacing(3)}px ${theme.spacing(1)}px ${theme.spacing(2)}px`,
8788
boxShadow: theme.shadows[6],
8889
alignItems: "inherit",
@@ -94,8 +95,8 @@ const useStyles = makeStyles((theme) => ({
9495
color: theme.palette.info.contrastText,
9596
},
9697
snackbarContentError: {
97-
backgroundColor: theme.palette.error.dark,
98+
backgroundColor: theme.palette.background.paper,
9899
borderLeftColor: theme.palette.error.main,
99-
color: theme.palette.error.contrastText,
100+
color: theme.palette.text.secondary,
100101
},
101102
}))

0 commit comments

Comments
 (0)