-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding typescript dep * Adding tsconfig file * convert hero component to ts and adding type deps * convert hero test file to ts * converting biscuit component| * fixing build error dependencies * change title to be heading * add basic content type * convert cool section and use fixture content * convery cool test file to tsx * convert work section to typescript and update snapshots * fixing props that were the wrong way around * update snapshot tests again * update type import to correct syntax * type linting * update index js files to be index ts
- Loading branch information
Showing
28 changed files
with
10,456 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
|
||
# misc | ||
.DS_Store | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
|
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 was deleted.
Oops, something went wrong.
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,42 @@ | ||
import React, { ReactElement } from "react" | ||
import biscuitOutside from "./Assets/biscuit-outside.png" | ||
import biscuitPortrait from "./Assets/biscuit-portrait.jpg" | ||
import biscuitSocks from "./Assets/biscuit-socks.jpg" | ||
import type { BasicContent } from "../types" | ||
|
||
export const Biscuit = ({ | ||
heading, | ||
caption, | ||
intro, | ||
}: BasicContent): ReactElement => ( | ||
<section className="section section-biscuit section-biscuit-layout"> | ||
<div className="flex-row"> | ||
<h2 className="profile-heading" data-testid="biscuit-heading"> | ||
{heading} | ||
</h2> | ||
<p className="profile-caption" data-testid="biscuit-caption"> | ||
{caption} | ||
</p> | ||
<p className="profile-intro" data-testid="biscuit-intro"> | ||
{intro} | ||
</p> | ||
</div> | ||
<div className="biscuit-image-row" data-testid="biscuit-image-row"> | ||
<img | ||
src={biscuitOutside} | ||
alt="biscuit-left" | ||
className="biscuit-image biscuit-image-mobile" | ||
/> | ||
<img | ||
src={biscuitPortrait} | ||
alt="biscuit-middle" | ||
className="biscuit-image" | ||
/> | ||
<img | ||
src={biscuitSocks} | ||
alt="biscuit-right" | ||
className="biscuit-image biscuit-image-mobile biscuit-image-ipad" | ||
/> | ||
</div> | ||
</section> | ||
) |
File renamed without changes.
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 was deleted.
Oops, something went wrong.
6 changes: 4 additions & 2 deletions
6
src/components/CoolSection/cool.spec.js → src/components/CoolSection/cool.spec.tsx
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import React from "react" | ||
import { render } from "@testing-library/react" | ||
import { Cool } from "./" | ||
import { Cool } from "." | ||
|
||
test("renders Cool section correctly", () => { | ||
const { container } = render(<Cool />) | ||
const { container } = render( | ||
<Cool heading="heading" caption="caption" intro="intro" /> | ||
) | ||
|
||
expect(container).toMatchSnapshot() | ||
}) |
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,16 @@ | ||
import React, { ReactElement } from "react" | ||
import type { BasicContent } from "../types" | ||
|
||
export const Cool = ({ | ||
heading, | ||
caption, | ||
intro, | ||
}: BasicContent): ReactElement => ( | ||
<section className="section section-cool"> | ||
<div className="flex-row"> | ||
<h2 className="profile-heading">{heading}</h2> | ||
<p className="profile-caption">{caption}</p> | ||
<p className="profile-intro">{intro}</p> | ||
</div> | ||
</section> | ||
) |
File renamed without changes.
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
12 changes: 6 additions & 6 deletions
12
src/components/HeroSection/hero.spec.jsx → src/components/HeroSection/hero.spec.tsx
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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
import React from "react" | ||
import { render, screen } from "@testing-library/react" | ||
import { Hero } from "./" | ||
import { Hero } from "." | ||
|
||
describe("Hero Section", () => { | ||
|
||
test("renders Hero section correctly", () => { | ||
const { container } = render(<Hero />) | ||
const { container } = render(<Hero heading='heading' caption="caption" intro='intro'/>) | ||
|
||
expect(container).toMatchSnapshot() | ||
}) | ||
|
||
|
||
test("renders Hero section heading", () => { | ||
render(<Hero />) | ||
render(<Hero heading='heading' caption="caption" intro='intro'/>) | ||
|
||
expect(screen.getByTestId('profile-heading')).toBeInTheDocument(); | ||
}) | ||
|
||
test("renders Hero section caption", () => { | ||
render(<Hero />) | ||
render(<Hero heading='heading' caption="caption" intro='intro'/>) | ||
|
||
expect(screen.getByTestId('profile-caption')).toBeInTheDocument(); | ||
}) | ||
|
||
test("renders Hero section intro", () => { | ||
render(<Hero />) | ||
render(<Hero heading='heading' caption="caption" intro='intro' />) | ||
|
||
expect(screen.getByTestId('profile-caption')).toBeInTheDocument(); | ||
expect(screen.getByTestId('profile-intro')).toBeInTheDocument(); | ||
}) | ||
|
||
}) |
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
File renamed without changes.
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
File renamed without changes.
Oops, something went wrong.