diff --git a/src/lib/components/tooltip/tooltip.svelte b/src/lib/components/tooltip/tooltip.svelte new file mode 100644 index 00000000..360c8da0 --- /dev/null +++ b/src/lib/components/tooltip/tooltip.svelte @@ -0,0 +1,55 @@ + + + + {#if children} + {@render children()} + {/if} + + +{#if $open} +
+ {#if icon} + {@const IconComponent = icon} + + + + + {/if} + {content} +
+{/if} diff --git a/src/routes/[network]/(dev)/debug/components/+page.svelte b/src/routes/[network]/(dev)/debug/components/+page.svelte index bbe7105a..4a7c3a94 100644 --- a/src/routes/[network]/(dev)/debug/components/+page.svelte +++ b/src/routes/[network]/(dev)/debug/components/+page.svelte @@ -11,11 +11,12 @@ import Progress from './sections/progress.svelte'; import Tables from './sections/tables.svelte'; import Charts from './sections/charts.svelte'; + import Tooltips from './sections/tooltips.svelte';

Design System

- +
@@ -57,4 +58,8 @@
+ +
+ +
diff --git a/src/routes/[network]/(dev)/debug/components/sections/tooltips.svelte b/src/routes/[network]/(dev)/debug/components/sections/tooltips.svelte new file mode 100644 index 00000000..1cf4de39 --- /dev/null +++ b/src/routes/[network]/(dev)/debug/components/sections/tooltips.svelte @@ -0,0 +1,70 @@ + + + +
+

Tooltips

+

Tooltips provide additional information when hovering over an element.

+
+ +
+ + Small tooltip + +
+ +
+ + Medium tooltip + +
+ +
+ + Large tooltip + +
+ +
+ + Tooltip with custom icon + +
+ +
+ + Slow open and close tooltip + +
+ +
+ + Slowly appearing tooltip + +
+ +
+ + + + + +
+