create a LinkTypeWrapper (#709)

- AboutCard requires both internal and external links
- LinkTypeWrapper allows the component to specify link type
- add tests
This commit is contained in:
Vim 2021-09-20 06:55:08 -07:00 committed by GitHub
commit 58f4102d6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 154 additions and 26 deletions

View file

@ -171,8 +171,10 @@ const IndexPage = ({location}: IndexPageProps) => {
size={'small'}
imgSrc={accountBalanceIcon}
header={'Federal program managers'}
actionText={'Go to data & methodology'}
actionUrl={'./methodology'}>
linkText={'Go to data & methodology'}
url={'/methodology'}
internal={true}
>
Download the screening tools draft list of communities of focus.
Explore data that may be useful to your program, and provide
feedback on the tool.
@ -182,8 +184,10 @@ const IndexPage = ({location}: IndexPageProps) => {
size={'small'}
imgSrc={groupsIcon}
header={'Community members'}
actionText={'Explore the tool'}
actionUrl={'./cejst'}>
linkText={'Explore the tool'}
url={'/cejst'}
internal={true}
>
Explore data about communities of focus in your area, and help
provide feedback on the tool.
</AboutCard>
@ -198,8 +202,10 @@ const IndexPage = ({location}: IndexPageProps) => {
size={'small'}
imgSrc={commentIcon}
header={'Send feedback'}
actionText={'Email: screeningtool.feedback@usds.gov'}
actionUrl={'mailto:screeningtool.feedback@usds.gov'}>
linkText={'Email: screeningtool.feedback@usds.gov'}
url={'mailto:screeningtool.feedback@usds.gov'}
internal={false}
>
Have ideas about how this tool can be improved to better
reflect the on-the-ground experiences of your community?
</AboutCard>
@ -208,9 +214,11 @@ const IndexPage = ({location}: IndexPageProps) => {
size={'small'}
imgSrc={githubIcon}
header={'Join the open source community'}
actionText={'Check it out on GitHub'}
actionUrl={'https://github.com/usds/justice40-tool'}
actionOpenInNewTab={true}>
linkText={'Check it out on GitHub'}
url={'https://github.com/usds/justice40-tool'}
openUrlNewTab={true}
internal={false}
>
The screening tools code is open source, which means it is
available for the public to view and contribute to. Anyone
can view and contribute on GitHub.