File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
src/components/Hero/HubHero Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const HubHero = ({
13
13
buttons,
14
14
} : CommonHeroProps ) => {
15
15
if ( buttons && buttons . length > 2 ) {
16
- throw Error (
16
+ throw new Error (
17
17
"Can not have more than two call-to-action buttons in this hero component."
18
18
)
19
19
}
@@ -49,21 +49,25 @@ const HubHero = ({
49
49
backdropBlur = { { xl : "base" } }
50
50
wordBreak = "break-word"
51
51
>
52
- < Heading
53
- as = "h1"
54
- size = "sm"
55
- color = "body.medium"
56
- fontWeight = "normal"
57
- textTransform = "uppercase"
58
- >
59
- { title }
60
- </ Heading >
52
+ { title ? (
53
+ < Heading
54
+ as = "h1"
55
+ size = "sm"
56
+ color = "body.medium"
57
+ fontWeight = "normal"
58
+ textTransform = "uppercase"
59
+ >
60
+ { title }
61
+ </ Heading >
62
+ ) : null }
61
63
< Stack
62
64
alignSelf = "center"
63
65
spacing = { { base : "2" , md : "1" } }
64
66
maxW = "container.md"
65
67
>
66
- < Heading size = "2xl" > { header } </ Heading >
68
+ < Heading as = { title ? "h2" : "h1" } size = "2xl" >
69
+ { header }
70
+ </ Heading >
67
71
< Text size = "lg" > { description } </ Text >
68
72
</ Stack >
69
73
< HStack justify = { { md : "center" , xl : "start" } } spacing = "4" >
You can’t perform that action at this time.
0 commit comments