diff --git a/src/App.tsx b/src/App.tsx index 694ccd3..5078e2a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,6 +5,7 @@ import Inspector from './components/Inspector'; import Toolbar from './components/Toolbar'; import Zoom from './components/Zoom'; import { isDrawingAtom, onKeyPressAtom } from './store/store'; +import HistoryControls from './components/HistoryControls'; const App = () => { const [, onKeyPress] = useAtom(onKeyPressAtom); @@ -30,7 +31,10 @@ const App = () => { {/* */} - +
+ + +
); }; diff --git a/src/components/HistoryControls.tsx b/src/components/HistoryControls.tsx new file mode 100644 index 0000000..6210d0a --- /dev/null +++ b/src/components/HistoryControls.tsx @@ -0,0 +1,56 @@ +import { useAtom } from 'jotai'; +import { useHistoryAtom } from '../store/store'; + +const HistoryControls = () => { + const [, doRedo] = useAtom(useHistoryAtom); + + return ( + //
+
+ + + +
+ //
+ ); +}; + +export default HistoryControls; diff --git a/src/components/SingleElement.tsx b/src/components/SingleElement.tsx index 7ff6903..92f97f0 100644 --- a/src/components/SingleElement.tsx +++ b/src/components/SingleElement.tsx @@ -33,7 +33,7 @@ const SingleElement = ({ element }: Props) => { onMouseDown={() => onDragStart(element)} onMouseUp={onMouseUp} > - {element.type === 'foreignObject' &&