Skip to content

Commit

Permalink
feat: add footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul Andrade committed Mar 10, 2022
1 parent 52846a9 commit aadf98c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/components/footer/footer.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { render, screen } from '@testing-library/react'
import { Footer } from './footer'

describe('<Footer/>', () => {
it('should be render a Footer component', () => {
render(<Footer />)

expect(screen.getByText(/created with by/i)).toBeInTheDocument()
expect(screen.getByText(//i)).toBeInTheDocument()
expect(
screen.getByRole('link', {
name: /raul andrade/i
})
).toBeInTheDocument()
})
})
19 changes: 19 additions & 0 deletions src/components/footer/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export const Footer = () => {
return (
<footer className="pb-6 flex justify-center font-thin dark:text-gray-300 text-gray-700">
<p>
{`Created with `}
<span className="text-rose-600">♥️</span>
{` by `}
<a
className="border-b-blue-500 text-blue-500 hover:border-b-[1px]"
href="https://github.com/andraderaul"
target="_blank"
rel="noreferrer"
>
Raul Andrade
</a>
</p>
</footer>
)
}
1 change: 1 addition & 0 deletions src/components/footer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Footer } from './footer'
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export { SubTitle } from './sub-title'
export { PrimaryButton } from './primary-button'
export { PrimaryText } from './primary-text'
export { Header } from './header'
export { Footer } from './footer'
3 changes: 2 additions & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Document, { Html, Head, Main, NextScript } from 'next/document'

import { Footer } from 'components'
export default class MyDocument extends Document {
render() {
return (
Expand All @@ -15,6 +15,7 @@ export default class MyDocument extends Document {
<Main />
<NextScript />
</body>
<Footer />
</Html>
)
}
Expand Down

1 comment on commit aadf98c

@vercel
Copy link

@vercel vercel bot commented on aadf98c Mar 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.