Skip to content

Commit

Permalink
Merge pull request #7 from urbint/mr/add-doc-link
Browse files Browse the repository at this point in the history
Creating documentation component link
  • Loading branch information
matheusrocha89 authored Feb 7, 2023
2 parents b38bae6 + d08e9c5 commit 019c015
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/DocumentationLink/DocumentationLink.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.description {
font-size: 16px;
}
16 changes: 16 additions & 0 deletions src/components/DocumentationLink/DocumentationLink.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { render, screen } from "@testing-library/react";

import { DocumentationLink } from "./DocumentationLink";

describe(DocumentationLink.name, () => {
it("renders correctly text and link", () => {
render(<DocumentationLink />);
const docLink = screen.getByRole("link");

expect(screen.getByText("Documentation")).toBeInTheDocument();
expect(docLink).toHaveAttribute(
"href",
"https://github.com/urbint/fe-app-project#fe-template-app"
);
});
});
17 changes: 17 additions & 0 deletions src/components/DocumentationLink/DocumentationLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import styles from "./DocumentationLink.module.css";

const DocumentationLink = () => {
return (
<>
<p className={styles.description}>
For more information about folder structure, best practices and tools
used check this link for more information:{" "}
</p>
<a href="https://github.com/urbint/fe-app-project#fe-template-app">
Documentation
</a>
</>
);
};

export { DocumentationLink };
1 change: 1 addition & 0 deletions src/components/DocumentationLink/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./DocumentationLink";
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./WelcomeMessage";
export * from "./DocumentationLink";
2 changes: 2 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Head from "next/head";
import { Inter } from "@next/font/google";
import styles from "@/styles/Home.module.css";
import { WelcomeMessage } from "@/components";
import { DocumentationLink } from "@/components/DocumentationLink";

const inter = Inter({ subsets: ["latin"] });

Expand All @@ -16,6 +17,7 @@ export default function Home() {
</Head>
<main className={`${styles.main} ${inter.className}`}>
<WelcomeMessage />
<DocumentationLink />
</main>
</>
);
Expand Down

0 comments on commit 019c015

Please sign in to comment.