From 99d9f34ffd12bbee0d114b3193c4764416907dd3 Mon Sep 17 00:00:00 2001 From: Conzer Date: Wed, 4 Dec 2024 03:22:18 -0500 Subject: [PATCH] toolbar and grid --- mapsy/src/components/Grid.jsx | 15 +++++++++++++++ mapsy/src/components/Toolbar.jsx | 13 ++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 mapsy/src/components/Grid.jsx diff --git a/mapsy/src/components/Grid.jsx b/mapsy/src/components/Grid.jsx new file mode 100644 index 0000000..c7f2ad5 --- /dev/null +++ b/mapsy/src/components/Grid.jsx @@ -0,0 +1,15 @@ +import React from 'react'; +import { Rect } from 'react-konva'; + +const Grid = ({ gridSize, canvasSize }) => { + const lines = []; + for (let i = 0; i <= canvasSize; i += gridSize) { + lines.push( + , + + ); + } + return lines; +}; + +export default Grid; \ No newline at end of file diff --git a/mapsy/src/components/Toolbar.jsx b/mapsy/src/components/Toolbar.jsx index b01f5e7..e6e5bbd 100644 --- a/mapsy/src/components/Toolbar.jsx +++ b/mapsy/src/components/Toolbar.jsx @@ -1 +1,12 @@ -import React from 'react'; \ No newline at end of file +import React from 'react'; + +const Toolbar = ({ setTool }) => { + return ( +
+ + +
+ ); +}; + +export default Toolbar; \ No newline at end of file