From 6eb78a26082aa5d50745a3399fa2ddbaf5234662 Mon Sep 17 00:00:00 2001 From: Hiren Kangad Date: Thu, 12 Mar 2026 21:02:32 +0530 Subject: [PATCH] feat(sticky): add sticky note button to toolbar --- frontend/src/components/Toolbar.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Toolbar.tsx b/frontend/src/components/Toolbar.tsx index 30430f7..7923f05 100644 --- a/frontend/src/components/Toolbar.tsx +++ b/frontend/src/components/Toolbar.tsx @@ -73,6 +73,15 @@ function IconText() { ); } +function IconSticky() { + return ( + + + + + ); +} + function IconReview() { return ( @@ -125,6 +134,7 @@ const toolButtons: { tool: ToolType; label: string; shortcut: string; numKey: st { tool: ToolType.PAN, label: 'Pan', shortcut: 'H', numKey: '2', Icon: IconPan, hint: 'Click and drag to pan the canvas' }, { tool: ToolType.PEN, label: 'Draw', shortcut: 'P', numKey: '3', Icon: IconPen, hint: 'Click and drag to draw freehand' }, { tool: ToolType.TEXT, label: 'Text', shortcut: 'T', numKey: '4', Icon: IconText, hint: 'Click on the canvas to place text' }, + { tool: ToolType.STICKY, label: 'Sticky', shortcut: 'S', numKey: '5', Icon: IconSticky, hint: 'Click on the canvas to place a sticky note' }, ]; const REVIEW_HINT = 'Click an object to place a comment pin. Press . to toggle.'; @@ -159,7 +169,7 @@ export default function Toolbar({ reviewMode, }: ToolbarProps) { const showStroke = activeTool === ToolType.PEN; - const showFontSize = activeTool === ToolType.TEXT; + const showFontSize = activeTool === ToolType.TEXT || activeTool === ToolType.STICKY; // Determine active hint const activeToolDef = toolButtons.find((t) => t.tool === activeTool);