Skip to content

Commit

Permalink
Warning banner (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
chribjel authored Sep 16, 2024
1 parent b550807 commit efa315e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
23 changes: 23 additions & 0 deletions src/components/header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Header as KvibHeader } from "@kvib/react";

export function Header() {
return (
<header>
<WarningBanner />
<KvibHeader />
</header>
);
}

function WarningBanner() {
return (
<div className="bg-red-50 text-red-900 text-sm font-medium px-4 py-2 rounded-md flex items-center flex-col">
<p>
Denne siden er under utvikling. Vi er ikke helt sikre på at alt funker
som det skal.
</p>
<p>Alt innhold blir liggende offentlig tilgjengelig.</p>
<p>Vær forsiktig med å legge inn sensitiv/hemmelig informasjon.</p>
</div>
);
}
7 changes: 3 additions & 4 deletions src/routes/__root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FooterInline, Header, KvibProvider } from "@kvib/react";
import { Header } from "@/components/header";
import { FooterInline, KvibProvider } from "@kvib/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { createRootRoute, Outlet } from "@tanstack/react-router";

Expand All @@ -9,9 +10,7 @@ export const Route = createRootRoute({
<QueryClientProvider client={queryClient}>
<KvibProvider>
<div className="flex flex-col min-h-svh">
<header>
<Header />
</header>
<Header />
<Outlet />
<footer>
<FooterInline />
Expand Down

0 comments on commit efa315e

Please sign in to comment.