Skip to content

Commit 9ae150d

Browse files
BrunoQuaresmapull[bot]
authored andcommitted
refactor: Reemove mono font from empty title (#5125)
1 parent 6a5587c commit 9ae150d

File tree

1 file changed

+19
-26
lines changed

1 file changed

+19
-26
lines changed

site/src/components/EmptyState/EmptyState.tsx

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import Box from "@material-ui/core/Box"
22
import { makeStyles } from "@material-ui/core/styles"
33
import Typography from "@material-ui/core/Typography"
44
import { FC, ReactNode } from "react"
5-
import { MONOSPACE_FONT_FAMILY } from "../../theme/constants"
65
import { combineClasses } from "../../util/combineClasses"
76

87
export interface EmptyStateProps {
@@ -38,24 +37,19 @@ export const EmptyState: FC<React.PropsWithChildren<EmptyStateProps>> = (
3837

3938
return (
4039
<Box className={combineClasses([styles.root, className])} {...boxProps}>
41-
<div className={styles.header}>
42-
<Typography variant="h5" className={styles.title}>
43-
{message}
40+
<Typography variant="h5" className={styles.title}>
41+
{message}
42+
</Typography>
43+
{description && (
44+
<Typography
45+
variant="body2"
46+
color="textSecondary"
47+
className={combineClasses([styles.description, descriptionClassName])}
48+
>
49+
{description}
4450
</Typography>
45-
{description && (
46-
<Typography
47-
variant="body2"
48-
color="textSecondary"
49-
className={combineClasses([
50-
styles.description,
51-
descriptionClassName,
52-
])}
53-
>
54-
{description}
55-
</Typography>
56-
)}
57-
</div>
58-
{cta}
51+
)}
52+
{cta && <div className={styles.cta}>{cta}</div>}
5953
</Box>
6054
)
6155
}
@@ -70,18 +64,17 @@ const useStyles = makeStyles(
7064
textAlign: "center",
7165
minHeight: 300,
7266
padding: theme.spacing(3),
73-
fontFamily: MONOSPACE_FONT_FAMILY,
74-
},
75-
header: {
76-
marginBottom: theme.spacing(3),
7767
},
68+
7869
title: {
79-
fontWeight: 600,
80-
fontFamily: "inherit",
70+
fontSize: theme.spacing(3),
8171
},
8272
description: {
83-
marginTop: theme.spacing(1),
84-
fontFamily: "inherit",
73+
marginTop: theme.spacing(1.5),
74+
fontSize: theme.spacing(2),
75+
},
76+
cta: {
77+
marginTop: theme.spacing(4),
8578
},
8679
}),
8780
{ name: "EmptyState" },

0 commit comments

Comments
 (0)