@@ -2,7 +2,6 @@ import Box from "@material-ui/core/Box"
2
2
import { makeStyles } from "@material-ui/core/styles"
3
3
import Typography from "@material-ui/core/Typography"
4
4
import { FC , ReactNode } from "react"
5
- import { MONOSPACE_FONT_FAMILY } from "../../theme/constants"
6
5
import { combineClasses } from "../../util/combineClasses"
7
6
8
7
export interface EmptyStateProps {
@@ -38,24 +37,19 @@ export const EmptyState: FC<React.PropsWithChildren<EmptyStateProps>> = (
38
37
39
38
return (
40
39
< 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 }
44
50
</ 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 > }
59
53
</ Box >
60
54
)
61
55
}
@@ -70,18 +64,17 @@ const useStyles = makeStyles(
70
64
textAlign : "center" ,
71
65
minHeight : 300 ,
72
66
padding : theme . spacing ( 3 ) ,
73
- fontFamily : MONOSPACE_FONT_FAMILY ,
74
- } ,
75
- header : {
76
- marginBottom : theme . spacing ( 3 ) ,
77
67
} ,
68
+
78
69
title : {
79
- fontWeight : 600 ,
80
- fontFamily : "inherit" ,
70
+ fontSize : theme . spacing ( 3 ) ,
81
71
} ,
82
72
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 ) ,
85
78
} ,
86
79
} ) ,
87
80
{ name : "EmptyState" } ,
0 commit comments