diff --git a/src/components/DrawingCanvas.css b/src/components/DrawingCanvas.css new file mode 100644 index 0000000..3590ce3 --- /dev/null +++ b/src/components/DrawingCanvas.css @@ -0,0 +1,71 @@ +.drawing-container { + display: flex; + flex-direction: column; + height: 100vh; + width: 100%; + margin: 0; + padding: 0; + box-sizing: border-box; +} + +.toolbar { + display: flex; + align-items: center; + gap: 10px; + padding: 10px; + background: #f0f0f0; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +.tool-button { + padding: 8px; + background: transparent; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 24px; + color: #333; + transition: all 0.2s ease; +} + +.tool-button:hover { + background: #e0e0e0; + transform: scale(1.1); +} + +.tool-button.active { + color: #007bff; +} + +.canvas-container { + flex: 1; + width: 100%; + display: flex; + justify-content: center; + align-items: center; + background: #fff; +} + +.drawing-canvas { + width: 100%; + height: 100%; + background-color: #fff; + border: 1px solid #ddd; + box-sizing: border-box; +} + +.color-picker { + position: relative; +} + +.thickness-controls { + display: flex; + align-items: center; + gap: 5px; +} + +.thickness-controls button { + padding: 5px; + font-size: 20px; + border-radius: 4px; +} diff --git a/src/components/DrawingCanvas.js b/src/components/DrawingCanvas.js index 9811069..2c4959a 100644 --- a/src/components/DrawingCanvas.js +++ b/src/components/DrawingCanvas.js @@ -178,34 +178,39 @@ const DrawingCanvas = ({ color, setColor, thickness, setThickness, history, setH }; return ( -
- +
+ + - - -
setColor(color.hex)} />
- - + + {thickness} + +
+
+
+ setThickness(e.target.value)}