diff --git a/app/components/ui/Toolbar/Toolbar.spec.tsx b/app/components/ui/Toolbar/Toolbar.spec.tsx
index 7b81e31..18f32c6 100755
--- a/app/components/ui/Toolbar/Toolbar.spec.tsx
+++ b/app/components/ui/Toolbar/Toolbar.spec.tsx
@@ -15,3 +15,16 @@ describe('Toolbar', () => {
expect(screen.getByTestId('toolbar')).toHaveClass(customClass);
});
});
+
+describe('ToolbarItem', () => {
+ it('renders children correctly', () => {
+ render(Hello World);
+ expect(screen.getByTestId('toolbar-item')).toBeInTheDocument();
+ expect(screen.getByTestId('toolbar-item')).toHaveTextContent('Hello World');
+ });
+
+ it('applies custom className', () => {
+ render(Content);
+ expect(screen.getByTestId('toolbar-item')).toHaveClass('custom-class');
+ });
+});
diff --git a/app/components/ui/Toolbar/Toolbar.stories.tsx b/app/components/ui/Toolbar/Toolbar.stories.tsx
index 4e950fe..afba883 100755
--- a/app/components/ui/Toolbar/Toolbar.stories.tsx
+++ b/app/components/ui/Toolbar/Toolbar.stories.tsx
@@ -1,6 +1,8 @@
import type { Meta, StoryObj } from '@storybook/react';
import { Toolbar } from './Toolbar';
+import IconCircle from '~/icons/icon-circle.svg?react';
+import IconTrash from '~/icons/icon-trash.svg?react';
const meta = {
title: 'UI/Toolbar',
@@ -23,4 +25,22 @@ export const Default: Story = {
args: {
children: 'Default Toolbar',
},
-};
\ No newline at end of file
+};
+
+export const WithItems: Story = {
+ args: {
+ children: (
+ <>
+
+
+
+
+
+
+
+
+
+ >
+ ),
+ },
+};
diff --git a/app/components/ui/Toolbar/Toolbar.tsx b/app/components/ui/Toolbar/Toolbar.tsx
index 7ca4ffa..8988594 100755
--- a/app/components/ui/Toolbar/Toolbar.tsx
+++ b/app/components/ui/Toolbar/Toolbar.tsx
@@ -14,7 +14,7 @@ export const Toolbar = ({ className, children }: ToolbarProps) => {
});
const classNames = clsx(
- 'flex flex-col cursor-auto relative w-[120px] min-h-[200px] bg-white border-gray-100 border p-4 rounded-lg drop-shadow-sm transition-opacity duration-200 translate-x-4 translate-y-4 z-50',
+ 'flex flex-col cursor-auto relative w-[120px] min-h-[200px] bg-white border-gray-100 border p-2 rounded-lg drop-shadow-sm transition-opacity duration-200 translate-x-4 translate-y-4 z-50',
className,
{
'opacity-50': isDragging,
@@ -36,7 +36,7 @@ export const Toolbar = ({ className, children }: ToolbarProps) => {
data-testid="toolbar"
tabIndex={-1}
>
- {children}
+