-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create and add component for CTA in FragmentRender * small component layout changes to support CTA * change button class in globals.css to closer match ActionButton * add alttext to image request in benefitsNavigatorArticlesQuery * remove unused CTA on Benefits Navigator index page * remove console.log * replace inaccessible key prop from child Button in FragmentRender * call isHTML to check CTA body content
- Loading branch information
Showing
10 changed files
with
86 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
components/fragment_renderer/fragment_components/ArticleCTA.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { CTA } from "../../design-system/CTA"; | ||
import TextRender from "../../text_node_renderer/TextRender"; | ||
|
||
export default function ArticleCTA(props) { | ||
return ( | ||
<CTA | ||
heading={ | ||
props.locale === "en" | ||
? props.fragmentData.scTitleEn | ||
: props.fragmentData.scTitleFr | ||
} | ||
body={ | ||
<TextRender | ||
data={ | ||
props.locale === "en" | ||
? props.fragmentData.scContentEn.json | ||
: props.fragmentData.scContentFr.json | ||
} | ||
excludeH1={true} | ||
/> | ||
} | ||
ButtonProps={{ | ||
id: props.fragmentData.scLabsButton[0].scId, | ||
text: | ||
props.locale === "en" | ||
? props.fragmentData.scLabsButton[0].scTitleEn | ||
: props.fragmentData.scLabsButton[0].scTitleFr, | ||
href: | ||
props.locale === "en" | ||
? props.fragmentData.scLabsButton[0].scDestinationURLEn | ||
: props.fragmentData.scLabsButton[0].scDestinationURLFr, | ||
className: | ||
"w-fit bg-[#26374A] mt-4 text-white visited:text-white hover:bg-[#1C578A] hover:no-underline hover:text-white active:bg-[#16446C]", | ||
}} | ||
containerClass="layout-container my-4" | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters