generated from ReCoded-Org/capstone-react-redux-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Completed Hero section * Done with snapshot testing * added a missing dependency for snapshot testing Co-authored-by: allan <[email protected]>
- Loading branch information
1 parent
9a50adf
commit 3304666
Showing
8 changed files
with
913 additions
and
27 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,13 +1,15 @@ | ||
import React from 'react'; | ||
// import { Routes, Route } from "react-router-dom"; | ||
|
||
import Hero from './components/Hero/Hero'; | ||
import './App.css'; | ||
|
||
function App() { | ||
return ( <div className = "App" > | ||
<h1>Hello</h1> | ||
</div> | ||
); | ||
return ( | ||
<div className="App"> | ||
<Hero /> | ||
<h1>Hello</h1> | ||
</div> | ||
); | ||
} | ||
|
||
export default App; | ||
export default App; |
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,37 @@ | ||
function Hero() { | ||
return ( | ||
<div className="bg-dark-gray flex justify-around items-center px-32 small:px-14 small:py-5 medium:py-6 medium:px-16 large:py-8 large:px-18"> | ||
<div className="text-left"> | ||
<h1 className="text-white text-5xl leading-snug font-semibold font-inter small:text-lg medium:text-3xl large:text-4xl"> | ||
10,254 Jobs <br /> Are Listed Here! | ||
</h1> | ||
<h3 className="text-xl text-white medium:text-yellow-30 font-inter small:text-xs medium:text-lg large:xl"> | ||
Find your dream job now | ||
</h3>{' '} | ||
<div className=" mt-5 w-48 small:w-36 medium:w-56 large:w-72"> | ||
<input | ||
type="search" | ||
className="rounded-3xl px-6 py-2 outline-none absolute w-72 small:w-32 small:py-1.5 small:px-3 small:text-xs medium:w-52" | ||
placeholder="Type to search" | ||
/> | ||
<button | ||
type="submit" | ||
className="py-2 bg-accent px-5 rounded-3xl text-white relative left-52 hover:bg-red-500 small:py-1.5 small:px-3 small:text-xs small:left-24 medium:left-36 " | ||
> | ||
Search | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<img | ||
src="/assets/jobsearch.png" | ||
alt="a girl searching for job" | ||
className="w-500 small:w-300 ml-7" | ||
/> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Hero; |
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,8 @@ | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Hero from './Hero'; | ||
|
||
it('renders correctly when the component matches the snapshot', () => { | ||
const tree = renderer.create(<Hero />).toJSON(); | ||
expect(tree).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,47 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders correctly when the component matches the snapshot 1`] = ` | ||
<div | ||
className="bg-dark-gray flex justify-around items-center px-32 small:px-14 small:py-5 medium:py-6 medium:px-16 large:py-8 large:px-18" | ||
> | ||
<div | ||
className="text-left" | ||
> | ||
<h1 | ||
className="text-white text-5xl leading-snug font-semibold font-inter small:text-lg medium:text-3xl large:text-4xl" | ||
> | ||
10,254 Jobs | ||
<br /> | ||
Are Listed Here! | ||
</h1> | ||
<h3 | ||
className="text-xl text-white medium:text-yellow-30 font-inter small:text-xs medium:text-lg large:xl" | ||
> | ||
Find your dream job now | ||
</h3> | ||
<div | ||
className=" mt-5 w-48 small:w-36 medium:w-56 large:w-72" | ||
> | ||
<input | ||
className="rounded-3xl px-6 py-2 outline-none absolute w-72 small:w-32 small:py-1.5 small:px-3 small:text-xs medium:w-52" | ||
placeholder="Type to search" | ||
type="search" | ||
/> | ||
<button | ||
className="py-2 bg-accent px-5 rounded-3xl text-white relative left-52 hover:bg-red-500 small:py-1.5 small:px-3 small:text-xs small:left-24 medium:left-36 " | ||
type="submit" | ||
> | ||
Search | ||
</button> | ||
</div> | ||
</div> | ||
<div> | ||
<img | ||
alt="a girl searching for job" | ||
className="w-500 small:w-300 ml-7" | ||
src="/assets/jobsearch.png" | ||
/> | ||
</div> | ||
</div> | ||
`; |
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
Oops, something went wrong.