diff --git a/frontend/src/components/WorkspaceLabelBar/LabelButton.tsx b/frontend/src/components/WorkspaceLabelBar/LabelButton.tsx
new file mode 100644
index 0000000..d212c98
--- /dev/null
+++ b/frontend/src/components/WorkspaceLabelBar/LabelButton.tsx
@@ -0,0 +1,46 @@
+import { Label } from '@/types';
+import { Edit, Trash2 } from 'lucide-react';
+import { MouseEventHandler } from 'react';
+
+export default function LabelButton({ id, name, color }: Label) {
+ const handleClick: MouseEventHandler = () => {
+ console.log(`LabelButton ${id} clicked`);
+ };
+ const handleEdit: MouseEventHandler = (event) => {
+ event.stopPropagation();
+ console.log(`Edit LabelButton ${id}`);
+ };
+ const handleDelete: MouseEventHandler = (event) => {
+ event.stopPropagation();
+ console.log(`Delete LabelButton ${id}`);
+ };
+
+ return (
+
+
+
+
+
+ );
+}
diff --git a/frontend/src/components/WorkspaceLabelBar/index.stories.tsx b/frontend/src/components/WorkspaceLabelBar/index.stories.tsx
new file mode 100644
index 0000000..5b45dee
--- /dev/null
+++ b/frontend/src/components/WorkspaceLabelBar/index.stories.tsx
@@ -0,0 +1,39 @@
+import { Meta } from '@storybook/react';
+import WorkspaceLabelBar from '.';
+import { Label } from '@/types';
+
+const meta: Meta = {
+ title: 'Workspace/WorkspaceLabelBar',
+ component: WorkspaceLabelBar,
+ parameters: {
+ layout: 'fullscreen',
+ },
+};
+
+export default meta;
+
+const labels: Label[] = [
+ {
+ id: 1,
+ name: 'Label 1',
+ color: '#FFaa33',
+ },
+ {
+ id: 2,
+ name: 'Label 2',
+ color: '#aaFF55',
+ },
+ {
+ id: 3,
+ name: 'Label 3',
+ color: '#77aaFF',
+ },
+];
+
+export const Default = () => {
+ return (
+
+
+
+ );
+};
diff --git a/frontend/src/components/WorkspaceLabelBar/index.tsx b/frontend/src/components/WorkspaceLabelBar/index.tsx
new file mode 100644
index 0000000..87b63ca
--- /dev/null
+++ b/frontend/src/components/WorkspaceLabelBar/index.tsx
@@ -0,0 +1,41 @@
+import { Label } from '@/types';
+import LabelButton from './LabelButton';
+import { Button } from '../ui/button';
+import { Play } from 'lucide-react';
+
+export default function WorkspaceLabelBar({ labels }: { labels: Label[] }) {
+ const handleAutoLabeling = () => {
+ console.log('Auto labeling');
+ };
+
+ return (
+
+
+
+
+ {labels.map((label) => (
+
+ ))}
+
+
+
+
+ );
+}
diff --git a/frontend/src/components/WorkspaceLayout/index.tsx b/frontend/src/components/WorkspaceLayout/index.tsx
index 2feb0a9..bdbf0e0 100644
--- a/frontend/src/components/WorkspaceLayout/index.tsx
+++ b/frontend/src/components/WorkspaceLayout/index.tsx
@@ -1,8 +1,9 @@
import { Outlet } from 'react-router-dom';
import Header from '../Header';
-import { Project } from '@/types';
+import { Label, Project } from '@/types';
import { ResizablePanelGroup, ResizablePanel } from '../ui/resizable';
import WorkspaceSidebar from '../WorkspaceSidebar';
+import WorkspaceLabelBar from '../WorkspaceLabelBar';
export default function WorkspaceLayout() {
const workspace: { name: string; projects: Project[] } = {
@@ -59,21 +60,41 @@ export default function WorkspaceLayout() {
},
],
};
+ const labels: Label[] = [
+ {
+ id: 1,
+ name: 'Label 1',
+ color: '#FFaa33',
+ },
+ {
+ id: 2,
+ name: 'Label 2',
+ color: '#aaFF55',
+ },
+ {
+ id: 3,
+ name: 'Label 3',
+ color: '#77aaFF',
+ },
+ ];
return (
<>
-
+
-
-
+
+
+
+
+
-
+
>
);
}
diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts
index 1bfb42d..561eb60 100644
--- a/frontend/src/types/index.ts
+++ b/frontend/src/types/index.ts
@@ -19,3 +19,9 @@ export type Project = {
type: 'Classification' | 'Detection' | 'Segmentation';
children: Array;
};
+
+export type Label = {
+ id: number;
+ name: string;
+ color: string;
+};