File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ type CallToActionProps = {
1414 backgroundImage ?: string ;
1515 text ?: string ;
1616 buttonText ?: string ;
17+ accentColour ?: string ;
1718} ;
1819
1920const overlayMaskGradientStyles = ( angle : string , startPosition : number ) => {
@@ -116,6 +117,7 @@ export const CallToActionAtom = ({
116117 backgroundImage,
117118 text,
118119 buttonText,
120+ accentColour,
119121} : CallToActionProps ) => {
120122 return (
121123 < a
@@ -153,9 +155,17 @@ export const CallToActionAtom = ({
153155 size = "small"
154156 icon = { < SvgExternal /> }
155157 theme = { {
156- textPrimary : sourcePalette . neutral [ 7 ] ,
157- backgroundPrimary : sourcePalette . neutral [ 100 ] ,
158- backgroundPrimaryHover : sourcePalette . neutral [ 86 ] ,
158+ // We also still need to implement the dark mode based on the provided designs which should be the same as not providing an accent colour.
159+ textPrimary : accentColour
160+ ? sourcePalette . neutral [ 100 ]
161+ : sourcePalette . neutral [ 0 ] ,
162+ backgroundPrimary :
163+ accentColour ?? sourcePalette . neutral [ 100 ] ,
164+ //This is temporary as the behaviour we have in PROD is a lightbox when hover over the CTA.
165+ backgroundPrimaryHover : transparentColour (
166+ accentColour ?? sourcePalette . neutral [ 100 ] ,
167+ 0.8 ,
168+ ) ,
159169 } }
160170 >
161171 { buttonText }
Original file line number Diff line number Diff line change @@ -350,6 +350,9 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
350350 backgroundImage = { cta . image }
351351 text = { cta . label }
352352 buttonText = { cta . btnText }
353+ accentColour = {
354+ branding ?. hostedCampaignColour
355+ }
353356 />
354357 </ div >
355358 ) }
You can’t perform that action at this time.
0 commit comments