From 5c9ccb3ab759526e84079f1c49abb87c995c7021 Mon Sep 17 00:00:00 2001
From: mat <github@matdoes.dev>
Date: Fri, 18 Mar 2022 16:59:58 -0500
Subject: Add customization page

---
 src/lib/Tooltip.svelte | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/lib/Tooltip.svelte')

diff --git a/src/lib/Tooltip.svelte b/src/lib/Tooltip.svelte
index b354d42..14fa90d 100644
--- a/src/lib/Tooltip.svelte
+++ b/src/lib/Tooltip.svelte
@@ -4,9 +4,12 @@
     A tooltip that works without requiring JavaScript to be enabled.
     When you hover or click on the element, it shows the content in a box above the element.
  -->
+<script lang="ts">
+	export let width = '10em'
+</script>
 
 <span class="tooltip-container" tabindex="-1">
-	<span class="tooltip-content">
+	<span class="tooltip-content" style="max-width: {width}">
 		<slot name="tooltip">No tooltip!</slot>
 	</span>
 	<span class="tooltip-inner">
@@ -47,7 +50,6 @@
 
 		width: max-content;
 		text-align: center;
-		max-width: 10em;
 		cursor: auto;
 		box-shadow: 0 0 1em 0.5em #0002;
 		pointer-events: none;
-- 
cgit 

