Skip to content

Commit f8643ea

Browse files
feat(toolbar): resolved merge conflicts
1 parent cb97039 commit f8643ea

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

client/src/components/Toolbar.jsx

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Download,
1010
FileImage,
1111
FileType,
12+
Brush,
1213
} from "lucide-react";
1314
import { cn } from "../lib/utils";
1415
import { Button } from "./ui/Button";
@@ -23,8 +24,6 @@ export const Toolbar = ({ activeTool, onToolChange, onClear, onExport }) => {
2324
{ type: "rectangle", icon: Square },
2425
{ type: "circle", icon: Circle },
2526
{ type: "line", icon: Minus },
26-
<<<<<<< Updated upstream
27-
=======
2827

2928
];
3029

@@ -66,7 +65,6 @@ export const Toolbar = ({ activeTool, onToolChange, onClear, onExport }) => {
6665
<div className="w-10 h-2 bg-gradient-to-r from-yellow-400 via-red-400 to-purple-400 rounded-full blur-[0.5px] opacity-90"></div>
6766
),
6867
},
69-
>>>>>>> Stashed changes
7068
];
7169

7270
return (
@@ -81,7 +79,7 @@ export const Toolbar = ({ activeTool, onToolChange, onClear, onExport }) => {
8179
size="icon"
8280
onClick={() => onToolChange(tool.type)}
8381
className={cn(
84-
"h-10 w-10 transition-all duration-200 hover:bg-secondary",
82+
"h-10 w-10 transition-all duration-200 hover:bg-secondary active:scale-95",
8583
activeTool === tool.type
8684
? "bg-primary text-primary-foreground ring-2 ring-offset-2 ring-primary"
8785
: ""
@@ -94,12 +92,41 @@ export const Toolbar = ({ activeTool, onToolChange, onClear, onExport }) => {
9492
})}
9593

9694
<Separator orientation="vertical" className="h-8 mx-1" />
95+
<DropdownMenu
96+
trigger={
97+
<Button
98+
variant="ghost"
99+
size="icon"
100+
className={cn(
101+
"h-10 w-10 transition-all duration-200 hover:bg-secondary active:scale-95",
102+
activeTool.startsWith("brush-")
103+
? "bg-primary text-primary-foreground ring-2 ring-offset-2 ring-primary"
104+
: ""
105+
)}
106+
aria-label="Brush tool"
107+
>
108+
<Brush className="h-5 w-5" />
109+
</Button>
110+
}
111+
>
112+
{brushTypes.map((brush) => (
113+
<DropdownMenuItem
114+
key={brush.id}
115+
onClick={() => onToolChange(`brush-${brush.id}`)}
116+
className="flex items-center gap-3 cursor-pointer hover:bg-gray-100 rounded-md px-2 py-1"
117+
>
118+
{brush.preview}
119+
<span className="capitalize">{brush.label}</span>
120+
</DropdownMenuItem>
121+
))}
122+
</DropdownMenu>
97123

124+
<Separator orientation="vertical" className="h-8 mx-1" />
98125
<Button
99126
variant="ghost"
100127
size="icon"
101128
onClick={onClear}
102-
className="h-10 w-10 transition-all duration-200 hover:bg-destructive/10 hover:text-destructive"
129+
className="h-10 w-10 transition-all duration-200 hover:bg-destructive/10 hover:text-destructive active:scale-95"
103130
aria-label="Clear canvas"
104131
>
105132
<Trash2 className="h-5 w-5" />
@@ -112,7 +139,7 @@ export const Toolbar = ({ activeTool, onToolChange, onClear, onExport }) => {
112139
<Button
113140
variant="ghost"
114141
size="icon"
115-
className="h-10 w-10 transition-all duration-200 hover:bg-secondary"
142+
className="h-10 w-10 transition-all duration-200 hover:bg-secondary active:scale-95"
116143
aria-label="Export canvas"
117144
>
118145
<Download className="h-5 w-5" />
@@ -135,4 +162,4 @@ export const Toolbar = ({ activeTool, onToolChange, onClear, onExport }) => {
135162
</div>
136163
</div>
137164
);
138-
};
165+
};

0 commit comments

Comments
 (0)