diff --git a/src/components/toolbar/SelectedBlock.tsx b/src/components/toolbar/SelectedBlock.tsx
new file mode 100644
index 0000000..6c58144
--- /dev/null
+++ b/src/components/toolbar/SelectedBlock.tsx
@@ -0,0 +1,60 @@
+import { useContext } from "react";
+
+import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
+
+import { TexturesContext } from "@/context/Textures";
+import { ToolContext } from "@/context/Tool";
+
+function SelectedBlock() {
+ const textures = useContext(TexturesContext);
+ const { selectedBlock } = useContext(ToolContext);
+
+ const convertToDataUrl = (textureName: string): string => {
+ const texture = textures[textureName];
+
+ const canvas = document.createElement("canvas");
+ const context = canvas.getContext("2d");
+
+ canvas.width = texture.frame.width;
+ canvas.height = texture.frame.height;
+
+ if (!context) return "";
+
+ const image = new Image();
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ image.src = (texture.baseTexture.resource as any).url;
+
+ context.drawImage(
+ image,
+ texture.frame.x,
+ texture.frame.y,
+ texture.frame.width,
+ texture.frame.height,
+ 0,
+ 0,
+ texture.frame.width,
+ texture.frame.height
+ );
+
+ return canvas.toDataURL();
+ };
+
+ return (
+ {selectedBlock}
+
Zoom (4)
+ +