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

Lines changed: 5 additions & 6 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy