From 3a63837d3d47e7adbdf024de8dca6a2736b5a55e Mon Sep 17 00:00:00 2001
From: Corentin THOMASSET <corentin.thomasset74@gmail.com>
Date: Sun, 27 Aug 2023 20:12:31 +0200
Subject: feat(new tool): iban validation and parser (#591)

---
 src/ui/c-tooltip/c-tooltip.vue | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 src/ui/c-tooltip/c-tooltip.vue

(limited to 'src/ui/c-tooltip/c-tooltip.vue')

diff --git a/src/ui/c-tooltip/c-tooltip.vue b/src/ui/c-tooltip/c-tooltip.vue
new file mode 100644
index 0000000..cc48fe1
--- /dev/null
+++ b/src/ui/c-tooltip/c-tooltip.vue
@@ -0,0 +1,27 @@
+<script setup lang="ts">
+const props = withDefaults(defineProps<{ tooltip?: string }>(), { tooltip: '' });
+const { tooltip } = toRefs(props);
+
+const targetRef = ref();
+const isTargetHovered = useElementHover(targetRef);
+</script>
+
+<template>
+  <div class="relative" inline-block>
+    <div ref="targetRef">
+      <slot />
+    </div>
+
+    <div
+      class="absolute bottom-100% left-50% z-10 mb-5px whitespace-nowrap rounded bg-black px-12px py-6px text-sm text-white shadow-lg transition transition transition-duration-0.2s -translate-x-1/2"
+      :class="{
+        'op-0 scale-0': isTargetHovered === false,
+        'op-100 scale-100': isTargetHovered,
+      }"
+    >
+      <slot name="tooltip">
+        {{ tooltip }}
+      </slot>
+    </div>
+  </div>
+</template>
-- 
cgit v1.2.3

