diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Header.css | 3 | ||||
| -rw-r--r-- | src/components/Header.tsx | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/components/Header.css b/src/components/Header.css index ef1dd60..0a562bf 100644 --- a/src/components/Header.css +++ b/src/components/Header.css @@ -3,9 +3,9 @@ height: 3rem; border-bottom: 1px solid var(--overlay); display: flex; - flex-direction: row; justify-content: space-between; align-items: center; + --button-height: 100%; > .title { font-weight: 500; @@ -15,7 +15,6 @@ nav { height: 100%; display: flex; - flex-direction: row; } } }
\ No newline at end of file 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> |
