Container wrapper components
This commit is contained in:
parent
f8ba855338
commit
e8802b8a32
3 changed files with 26 additions and 4 deletions
10
client-solid/src/Containers/PageContainer.tsx
Normal file
10
client-solid/src/Containers/PageContainer.tsx
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import { JSXElement } from "solid-js";
|
||||||
|
|
||||||
|
// MainContainer is the main container for the page.
|
||||||
|
export function PageContainer(props: { children: JSXElement }): JSXElement {
|
||||||
|
return (
|
||||||
|
<div class="flex min-h-screen flex-col items-center justify-between">
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
10
client-solid/src/Containers/PrimaryContainer.tsx
Normal file
10
client-solid/src/Containers/PrimaryContainer.tsx
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import { JSXElement } from "solid-js";
|
||||||
|
|
||||||
|
// PrimaryContainer is the main container for the content section of the page.
|
||||||
|
export function PrimaryContainer(props: { children: JSXElement }): JSXElement {
|
||||||
|
return (
|
||||||
|
<div class="mb-8 flex w-full flex-col items-center space-y-2 px-2 md:max-w-3xl ">
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -4,21 +4,23 @@ import { GlobalStateProvider } from "../Context/GlobalState";
|
||||||
import { Footer } from "./Footer";
|
import { Footer } from "./Footer";
|
||||||
import { LoginModal } from "./LoginModal";
|
import { LoginModal } from "./LoginModal";
|
||||||
import { Navbar } from "./Navbar";
|
import { Navbar } from "./Navbar";
|
||||||
|
import { PageContainer } from "./PageContainer";
|
||||||
import { Primary } from "./Primary";
|
import { Primary } from "./Primary";
|
||||||
|
import { PrimaryContainer } from "./PrimaryContainer";
|
||||||
|
|
||||||
function Root(): JSXElement {
|
function Root(): JSXElement {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<GlobalStateProvider>
|
<GlobalStateProvider>
|
||||||
<FancyBackground />
|
<FancyBackground />
|
||||||
<div class="flex flex-col items-center min-h-screen justify-between">
|
<PageContainer>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<LoginModal />
|
<LoginModal />
|
||||||
<div class="mb-8 flex w-full flex-col items-center space-y-2 px-2 md:max-w-3xl ">
|
<PrimaryContainer>
|
||||||
<Primary />
|
<Primary />
|
||||||
</div>
|
</PrimaryContainer>
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</PageContainer>
|
||||||
</GlobalStateProvider>
|
</GlobalStateProvider>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue