diff --git a/src/components/workspace/index.tsx b/src/components/workspace/index.tsx index 9b8f590..4803da1 100644 --- a/src/components/workspace/index.tsx +++ b/src/components/workspace/index.tsx @@ -119,7 +119,7 @@ export const Workspace: React.FC = (props) => { )} - + ); }; diff --git a/src/components/workspace/zoom.tsx b/src/components/workspace/zoom.tsx index 0236d07..9a6f6f9 100644 --- a/src/components/workspace/zoom.tsx +++ b/src/components/workspace/zoom.tsx @@ -4,6 +4,7 @@ import { useSelector } from "react-redux"; import { twMerge } from "tailwind-merge"; import { ids, selectors } from "@/constants"; import { useSkipFirstRender } from "@/hooks"; +import type { ISTKProps } from "@/types"; import { d3Extended } from "@/utils"; import { Tool } from "../toolbar/data"; @@ -49,7 +50,7 @@ export const panAndZoom = ({ k, x, y }) => { const panHandleClasses = "absolute z-10 text-black/40 cursor-pointer hover:text-black/80 transition-all duration-medium"; -const Zoom = () => { +const Zoom = (props: ISTKProps) => { const selectedTool = useSelector((state: any) => state.toolbar.selectedTool); const showControls = useSelector((state: any) => state.editor.showControls); @@ -94,29 +95,79 @@ const Zoom = () => { } }, [showControls]); + const zoomStyles = props.styles?.zoomControls; + const panStyles = props.styles?.panControls; + return ( -
-
+
+
-
+
- - - - + + + +
-
+
diff --git a/src/types/styles.ts b/src/types/styles.ts index c4fea01..7bbee2e 100644 --- a/src/types/styles.ts +++ b/src/types/styles.ts @@ -28,6 +28,24 @@ export interface IStyles { title?: IStyle; meta?: IStyle; }; + zoomControls?: { + in?: IStyle; + out?: IStyle; + buttons?: IStyle; + root?: IStyle; + }; + panControls?: { + wheel?: { + outerRing?: IStyle; + innerRing?: IStyle; + }; + handles?: { + up?: IStyle; + right?: IStyle; + down?: IStyle; + left?: IStyle; + }; + }; elements?: { booth?: { selected?: IStyle;