-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract section navigation and header
- Loading branch information
1 parent
68b6e50
commit 845c5c3
Showing
3 changed files
with
55 additions
and
39 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from "react"; | ||
export default function Header() { | ||
return ( | ||
<> | ||
<a id="Identity"> | ||
<h2>Select</h2> | ||
</a> | ||
<p> | ||
Select component is a dropdown menu for selecting an option from a list. | ||
</p> | ||
</> | ||
); | ||
} |
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
38 changes: 38 additions & 0 deletions
38
src/sections/Projects/Sistent/components/select/section-nav.js
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,38 @@ | ||
import { navigate } from "gatsby"; | ||
import TabButton from "../../../../../reusecore/Button"; | ||
import React from "react"; | ||
import { useLocation } from "@reach/router"; | ||
export default function SectionNav() { | ||
const location = useLocation(); | ||
return ( | ||
<div className="filterBtns"> | ||
<TabButton | ||
className={ | ||
location.pathname === "/projects/sistent/components/select" | ||
? "active" | ||
: "" | ||
} | ||
onClick={() => navigate("/projects/sistent/components/select")} | ||
title="Overview" | ||
/> | ||
<TabButton | ||
className={ | ||
location.pathname === "/projects/sistent/components/selet/guidance" | ||
? "active" | ||
: "" | ||
} | ||
onClick={() => navigate("/projects/sistent/components/select/guidance")} | ||
title="Guidance" | ||
/> | ||
<TabButton | ||
className={ | ||
location.pathname === "/projects/sistent/components/select/code" | ||
? "active" | ||
: "" | ||
} | ||
onClick={() => navigate("/projects/sistent/components/select/code")} | ||
title="Code" | ||
/> | ||
</div> | ||
); | ||
} |