From 2c09443ba23b8bfbac2eb667a036e7a7fa97b3fe Mon Sep 17 00:00:00 2001
From: mat <github@matdoes.dev>
Date: Fri, 18 Feb 2022 17:29:51 +0000
Subject: add stuff

---
 src/lib/minecraft/MinecraftTooltip.svelte | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 src/lib/minecraft/MinecraftTooltip.svelte

(limited to 'src/lib/minecraft/MinecraftTooltip.svelte')

diff --git a/src/lib/minecraft/MinecraftTooltip.svelte b/src/lib/minecraft/MinecraftTooltip.svelte
new file mode 100644
index 0000000..9c4e274
--- /dev/null
+++ b/src/lib/minecraft/MinecraftTooltip.svelte
@@ -0,0 +1,26 @@
+<!-- 
+    @component
+
+    A tooltip that looks like when you hover over a Minecraft item in an inventory. This requires JavaScript.
+ -->
+
+<span class="minecraft-tooltip">
+	<span class="tooltip-name">
+		<slot name="name" />
+	</span>
+	<span class="tooltip-lore">
+		<slot name="lore" />
+	</span>
+	<slot />
+</span>
+
+<style>
+	.minecraft-tooltip {
+		height: fit-content;
+	}
+	/* these elements exist so we can copy them later from GlobalTooltip */
+	.tooltip-name,
+	.tooltip-lore {
+		display: none;
+	}
+</style>
-- 
cgit 

