File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 11
11
imageSrc = homepageIllustration ,
12
12
imageAlt = " " ,
13
13
backgroundColor = " #1d70b8" , // GOV.UK blue by default
14
+ textColor = " #FFFFFF" ,
14
15
} = $props <{
15
16
title? : string ;
16
17
description? : string ;
20
21
imageSrc? : string ;
21
22
imageAlt? : string ;
22
23
backgroundColor? : string ;
24
+ textColor? : string ;
23
25
}>();
24
26
</script >
25
27
26
28
<div
27
29
class =" app-masthead"
28
- style ="background-color: {backgroundColor }; border-bottom-color: {backgroundColor };"
30
+ style ="background-color: {backgroundColor }; border-bottom-color: {backgroundColor }; --masthead-text-color: { textColor } ; "
29
31
>
30
32
<div class =" govuk-width-container" >
31
33
<div class =" govuk-grid-row" >
250
252
251
253
/* GOV.UK Typography - Scoped to our component with high specificity */
252
254
.app-masthead .govuk-heading-xl.govuk-heading-xl {
253
- color : #ffffff ; /* Override to white for masthead */
255
+ color : var (
256
+ --masthead-text-color ,
257
+ #ffffff
258
+ ); /* Override to textColor prop if specified otherwise fall back to white */
254
259
font-family : " GDS Transport" , arial , sans-serif ;
255
260
font-weight : 700 ;
256
261
font-size : 2rem ;
267
272
margin-bottom : 3.125rem ;
268
273
}
269
274
}
275
+
276
+ .app-masthead__description {
277
+ color : var (--masthead-text-color );
278
+ }
270
279
</style >
Original file line number Diff line number Diff line change 209
209
},
210
210
rows: 4 ,
211
211
},
212
+ {
213
+ name: " textColor" ,
214
+ category: " Visual" ,
215
+ value: " #FFFFFF" ,
216
+ description: {
217
+ markdown: true ,
218
+ arr: [" The text color of the title and description." ],
219
+ },
220
+ },
212
221
{
213
222
name: " includeButton" ,
214
223
category: " Call to Action" ,
You can’t perform that action at this time.
0 commit comments