summaryrefslogtreecommitdiff
path: root/src/components/Header.tsx
diff options
context:
space:
mode:
authorSam Nystrom <sam@samnystrom.dev>2024-03-13 17:45:11 +0000
committerSam Nystrom <sam@samnystrom.dev>2024-03-13 20:17:07 -0400
commit13451b7588aa5800f0c1a87e7c3b49830d9e4087 (patch)
treef93800bdfa2202928ebc42ecc9ad723a896715fe /src/components/Header.tsx
parentcc0fbd8e07c3d85400eaecbb2d4498d7108d3119 (diff)
refactor: add title prop to Header
Diffstat (limited to 'src/components/Header.tsx')
-rw-r--r--src/components/Header.tsx10
1 files changed, 5 insertions, 5 deletions
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>