From 13451b7588aa5800f0c1a87e7c3b49830d9e4087 Mon Sep 17 00:00:00 2001
From: Sam Nystrom <sam@samnystrom.dev>
Date: Wed, 13 Mar 2024 17:45:11 +0000
Subject: refactor: add title prop to Header

---
 src/components/Header.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'src/components/Header.tsx')

diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index 32fbce2..95d5fef 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -4,14 +4,14 @@ import './Header.css';
 
 export interface HeaderProps {
 	children: ComponentChildren;
+	class?: string;
+	title: string;
 }
 
-const Header = ({ children }: HeaderProps) => {
+const Header = ({ children, title, ...props }: HeaderProps) => {
 	return (
-		<header class="__Header">
-			<div class="title">
-				<Button kind="ghost" href="/">DataNodes</Button>
-			</div>
+		<header class={(props.class || '') + ' __Header'}>
+			{title && <Button kind="ghost" class="title" href="/">{title}</Button>}
 			<nav>
 				{children}
 			</nav>
-- 
cgit v1.2.3

