summaryrefslogtreecommitdiff
path: root/src/components/Toolbar.tsx
diff options
context:
space:
mode:
authorSam Nystrom <sam@samnystrom.dev>2024-03-13 18:01:48 +0000
committerSam Nystrom <sam@samnystrom.dev>2024-03-13 20:17:07 -0400
commit9eb1625ec5de3c221ed0445dde874fcb1dc3ff48 (patch)
treefe2d2cb383813ca3511af68065257b6ea561afe8 /src/components/Toolbar.tsx
parent13451b7588aa5800f0c1a87e7c3b49830d9e4087 (diff)
feat: add menu components
Diffstat (limited to 'src/components/Toolbar.tsx')
-rw-r--r--src/components/Toolbar.tsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/Toolbar.tsx b/src/components/Toolbar.tsx
new file mode 100644
index 0000000..1c985c1
--- /dev/null
+++ b/src/components/Toolbar.tsx
@@ -0,0 +1,23 @@
+import type { ComponentChildren } from 'preact';
+import Header from './Header.tsx';
+import Button from './Button.tsx';
+import './Toolbar.css';
+
+export interface ToolbarProps {
+ children: ComponentChildren;
+ title: string;
+}
+
+const Toolbar = ({ children, title }: ToolbarProps) => {
+ return (
+ <Header class="__Toolbar">
+ <menu class="actions">
+ {children}
+ </menu>
+ <Button kind="ghost" class="title">{title}</Button>
+ <div></div>
+ </Header>
+ );
+};
+
+export default Toolbar; \ No newline at end of file