-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue 716] Add ProcessContent.tsx and process page update (#788)
- Loading branch information
Showing
6 changed files
with
104 additions
and
3 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
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,59 @@ | ||
import { useTranslation } from "next-i18next"; | ||
import { Grid, GridContainer } from "@trussworks/react-uswds"; | ||
|
||
const ProcessContent = () => { | ||
const { t } = useTranslation("common", { keyPrefix: "Process" }); | ||
|
||
return ( | ||
<GridContainer className="padding-bottom-5 tablet:padding-top-0 desktop-lg:padding-top-0 border-bottom-2px border-base-lightest"> | ||
<h1 className="margin-0 tablet-lg:font-sans-xl desktop-lg:font-sans-2xl"> | ||
{t("title")} | ||
</h1> | ||
<Grid row gap> | ||
<Grid | ||
tabletLg={{ col: 12 }} | ||
desktop={{ col: 12 }} | ||
desktopLg={{ col: 12 }} | ||
> | ||
<p className="tablet-lg:font-sans-xl line-height-sans-3 usa-intro margin-top-2"> | ||
{t("content")} | ||
</p> | ||
</Grid> | ||
</Grid> | ||
<Grid row gap className="flex-align-start"> | ||
<Grid tabletLg={{ col: 4 }} desktopLg={{ col: 4 }}> | ||
<div className="margin-bottom-2 desktop:margin-y-0 border radius-md border-base-lighter padding-3"> | ||
<strong className="tablet-lg:font-sans-lg tablet-lg:margin-bottom-05"> | ||
{t("transparent_title")} | ||
</strong> | ||
<p className="margin-top-0 font-sans-md line-height-sans-4 desktop-lg:line-height-sans-6"> | ||
{t("transparent_content")} | ||
</p> | ||
</div> | ||
</Grid> | ||
<Grid tabletLg={{ col: 4 }} desktopLg={{ col: 4 }}> | ||
<div className="margin-bottom-2 desktop:margin-y-0 border radius-md border-base-lighter padding-3"> | ||
<strong className="tablet-lg:font-sans-lg tablet-lg:margin-bottom-05"> | ||
{t("iterative_title")} | ||
</strong> | ||
<p className="margin-top-0 font-sans-md line-height-sans-4 desktop-lg:line-height-sans-6"> | ||
{t("iterative_content")} | ||
</p> | ||
</div> | ||
</Grid> | ||
<Grid tabletLg={{ col: 4 }} desktopLg={{ col: 4 }}> | ||
<div className="border radius-md border-base-lighter padding-3"> | ||
<strong className="tablet-lg:font-sans-lg tablet-lg:margin-bottom-05"> | ||
{t("agile_title")} | ||
</strong> | ||
<p className="margin-top-0 font-sans-md line-height-sans-4 desktop-lg:line-height-sans-6"> | ||
{t("agile_content")} | ||
</p> | ||
</div> | ||
</Grid> | ||
</Grid> | ||
</GridContainer> | ||
); | ||
}; | ||
|
||
export default ProcessContent; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Meta } from "@storybook/react"; | ||
|
||
import ProcessContent from "src/components/ProcessContent"; | ||
|
||
const meta: Meta<typeof ProcessContent> = { | ||
title: "Components/Content/Process Content", | ||
component: ProcessContent, | ||
}; | ||
export default meta; | ||
|
||
export const Default = { | ||
parameters: { | ||
design: { | ||
type: "figma", | ||
url: "https://www.figma.com/proto/lpKPdyTyLJB5JArxhGjJnE/beta.grants.gov?node-id=918-1768&starting-point-node-id=918%3A1623&hide-ui=1", | ||
}, | ||
}, | ||
}; |
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,15 @@ | ||
import { render, screen } from "@testing-library/react"; | ||
|
||
import ProcessContent from "src/components/ProcessContent"; | ||
|
||
describe("Process Content", () => { | ||
it("Renders without errors", () => { | ||
render(<ProcessContent />); | ||
const ProcessH1 = screen.getByRole("heading", { | ||
level: 1, | ||
name: /Our open process/i, | ||
}); | ||
|
||
expect(ProcessH1).toBeInTheDocument(); | ||
}); | ||
}); |