Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIN-6] Create Navbar Template #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,056 changes: 544 additions & 512 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
"@types/node": "^18.15.0",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"firebase": "^9.20.0",
"bootstrap": "^5.2.3",
"dayjs": "^1.11.7",
"firebase": "^9.17.2",
"firebaseui": "^0.600.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.10.0",
"react-scripts": "5.0.1",
"sass": "^1.59.2",
"typescript": "^4.9.5",
Expand Down
9 changes: 3 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@

import "bootstrap/dist/css/bootstrap.min.css";
import RFPHistoryPage from 'pages/RFPHistory';
import NavBar from 'navbar';

function App() {

return (
<div className="App">
<RFPHistoryPage />
<div>
<NavBar />
</div>
);
}
Expand Down
5 changes: 4 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React from 'react';
import ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import './index.css';
import App from './App';

ReactDOM.render(
<React.StrictMode>
<App />
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>,
document.getElementById("root")
);
Expand Down
22 changes: 22 additions & 0 deletions src/navbar/NavBarHeader.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Tabs } from "@mantine/core";
import { NavLink } from "react-router-dom";

const navLinks = ["All RFP", "Incoming", "Rejected", "Approved"];

export default function NavBarHeader()
{
return (
<Tabs variant="outline" className="nav-tabs">
<Tabs.List>
{navLinks.map((link) => {
var linkValue = link.replace(/\s/g, "").toLowerCase();
return (
<Tabs.Tab value={linkValue} key={crypto.randomUUID()}>
<NavLink to={"rfp/" + linkValue} className="nav-link">{link}</NavLink>
</Tabs.Tab>
);
})}
</Tabs.List>
</Tabs>
);
};
13 changes: 13 additions & 0 deletions src/navbar/RfpRoutes.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Route, Routes } from "react-router";

export function RfpRoutes()
{
return (
<Routes>
<Route path="/allrfp" element={<h1>All RFP</h1>} />
<Route path="/incoming" element={<h1>Incoming RFP</h1>} />
<Route path="/rejected" element={<h1>Rejected RFP</h1>} />
<Route path="/approved" element={<h1>Approved RFP</h1>} />
</Routes>
);
}
15 changes: 15 additions & 0 deletions src/navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Route, Routes } from "react-router-dom";
import { RfpRoutes } from "./RfpRoutes";
import NavBarHeader from "./NavBarHeader";
import "./style.css";

export default function NavBar() {
return (
<>
<NavBarHeader />
<Routes>
<Route path="/rfp/*" element={<RfpRoutes />} />
</Routes>
</>
);
}
14 changes: 14 additions & 0 deletions src/navbar/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.nav-tabs {
margin-top: 1rem;
padding: 1rem;
}
.nav-tabs .nav-link {
text-decoration: none;
font-size: 1.6rem;
padding: 1.5rem;
color: #0095FF;
font-family: "Poppins";
font-style: normal;
font-weight: 500;
margin: 1.2rem;
}/*# sourceMappingURL=style.css.map */
1 change: 1 addition & 0 deletions src/navbar/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/navbar/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.nav-tabs {
margin-top: 1rem;
padding: 1rem;

.nav-link {
text-decoration: none;
font-size: 1.6rem;
padding: 1.5rem;
color: #0095FF;
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
margin: 1.2rem;
}
}
Loading