generated from gabrielduete/frontend-template-nextjs
-
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.
feat: crete structure introduction component and title component
- Loading branch information
1 parent
060834c
commit e7fd6a6
Showing
8 changed files
with
52 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import Introduction from '~/src/components/Introduction' | ||
|
||
const Home = () => { | ||
return <h1 className='text-3xl font-bold underline'>HELLO WORLD!</h1> | ||
return <Introduction /> | ||
} | ||
|
||
export default Home |
Empty file.
Empty file.
Empty file.
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,25 @@ | ||
import Image from 'next/image' | ||
|
||
import Title from '../Title' | ||
|
||
const Introduction = () => { | ||
return ( | ||
<section className='px-48 flex justify-center items-center gap-28'> | ||
<div> | ||
<Title content='Virtual healthcare for you' width='w-[427px]' /> | ||
<p className='text-gray-500 text-xl mt-6 w-[410px]'> | ||
Trafalgar provides progressive, and affordable healthcare, accessible | ||
on mobile and online for everyone | ||
</p> | ||
</div> | ||
<Image | ||
src='https://media.discordapp.net/attachments/778024116140769331/1137638119047446629/trafalgar-header_illustration_1.png' | ||
alt='decorative image' | ||
width={700} | ||
height={600} | ||
/> | ||
</section> | ||
) | ||
} | ||
|
||
export default Introduction |
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,13 @@ | ||
import { render, screen } from '@testing-library/react' | ||
|
||
import Title from '.' | ||
|
||
describe('<Title />', () => { | ||
it('should render title correctly', () => { | ||
const title = 'Shiryu amigo' | ||
|
||
render(<Title content={title} />) | ||
|
||
expect(screen.getByText(title)).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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type TitleProps = { | ||
content: string | ||
width?: string | ||
} | ||
|
||
const Title = ({ content, width }: TitleProps) => { | ||
return <h1 className={`text-5xl font-bold ${width}`}>{content}</h1> | ||
} | ||
|
||
export default Title |