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

refactor: add custom banner and refactor pagelayout to include it #3803

Merged
merged 2 commits into from
Sep 13, 2024
Merged
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
28 changes: 16 additions & 12 deletions src/frontend/src/components/pageLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CustomBanner } from "@/customization/components/custom-banner";
import { Separator } from "../ui/separator";

export default function PageLayout({
Expand All @@ -14,19 +15,22 @@ export default function PageLayout({
betaIcon?: boolean;
}) {
return (
<div className="flex h-full w-full flex-col justify-between overflow-auto bg-background px-16">
<div className="flex w-full items-center justify-between gap-4 space-y-0.5 py-8 pb-2">
<div className="flex w-full flex-col">
<h2
className="text-2xl font-bold tracking-tight"
data-testid="mainpage_title"
>
{title}
{betaIcon && <span className="store-beta-icon">BETA</span>}
</h2>
<p className="text-muted-foreground">{description}</p>
<div className="flex h-full w-full flex-col justify-between overflow-auto bg-background px-16 pt-6">
<div className="flex flex-col gap-4">
<CustomBanner />
<div className="flex w-full items-center justify-between gap-4 space-y-0.5 py-2">
<div className="flex w-full flex-col">
<h2
className="text-2xl font-bold tracking-tight"
data-testid="mainpage_title"
>
{title}
{betaIcon && <span className="store-beta-icon">BETA</span>}
</h2>
<p className="text-muted-foreground">{description}</p>
</div>
<div className="flex-shrink-0">{button && button}</div>
</div>
<div className="flex-shrink-0">{button && button}</div>
</div>
<Separator className="my-6 flex" />
{children}
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/src/customization/components/custom-banner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function CustomBanner() {
return <></>;
}
Loading