From 257e913ae6530b2375465e202aacabd0218c1fc4 Mon Sep 17 00:00:00 2001 From: KirillSerg Date: Wed, 4 Sep 2024 13:04:33 +0300 Subject: [PATCH 1/5] feat: added some styles --- src/App.tsx | 4 ++-- src/components/HistoryControls.tsx | 25 +++++++++++++++++-------- src/components/Inspector.tsx | 2 +- src/components/Toolbar.tsx | 22 +++++++++++----------- src/components/Zoom.tsx | 9 ++++----- src/components/elements/FreeIconBtn.tsx | 15 ++++++++++----- src/index.css | 2 +- 7 files changed, 46 insertions(+), 33 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index aec7f9b..f228328 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -29,9 +29,9 @@ const App = () => { -
- +
+
); diff --git a/src/components/HistoryControls.tsx b/src/components/HistoryControls.tsx index 6210d0a..0a99f1f 100644 --- a/src/components/HistoryControls.tsx +++ b/src/components/HistoryControls.tsx @@ -1,21 +1,30 @@ import { useAtom } from 'jotai'; -import { useHistoryAtom } from '../store/store'; +import { + currentHistoryIndexAtom, + historyAtom, + useHistoryAtom, +} from '../store/store'; const HistoryControls = () => { const [, doRedo] = useAtom(useHistoryAtom); + const [currentHistoryIndex] = useAtom(currentHistoryIndexAtom); + const [history] = useAtom(historyAtom); return ( - //
-
+ // h-fit w-fit px-2 fixed bottom-3 right-[20%] flex justify-center items-center gap-4 border-[1px] border-black +
- //
); }; diff --git a/src/components/Inspector.tsx b/src/components/Inspector.tsx index 6c4dc8d..aefd49f 100644 --- a/src/components/Inspector.tsx +++ b/src/components/Inspector.tsx @@ -112,7 +112,7 @@ const Inspector = () => { return ( <> {(elements[0].id || isDrawing) && ( -