speice.io/pages/LayoutBase.tsx

34 lines
714 B
TypeScript
Raw Normal View History

2023-04-21 22:23:19 -04:00
import { PropsWithChildren, StrictMode } from "react";
import { IconContext } from "react-icons";
import { FaHome, FaUser } from "react-icons/fa";
2023-04-16 20:10:40 -04:00
import "./style.css";
2023-04-21 21:39:53 -04:00
const Navbar: React.FC = () => (
<span className="navbar">
2023-04-21 22:23:19 -04:00
<a href="/">
<FaHome />
Home
</a>
<span>/</span>
<a href="/about">
<FaUser />
About
</a>
2023-04-16 20:10:40 -04:00
</span>
);
const Layout: React.FC<PropsWithChildren> = ({ children }) => (
2023-04-21 22:23:19 -04:00
<StrictMode>
<IconContext.Provider value={{ className: "icon" }}>
<div className="gridOffset">
<Navbar />
<hr style={{ marginTop: "0" }} />
{children}
</div>
</IconContext.Provider>
</StrictMode>
2023-04-16 20:10:40 -04:00
);
export default Layout;