Added logic to tooltips

This commit is contained in:
2023-06-26 13:59:14 +02:00
parent 26cb947d9f
commit 1088d27fea
4 changed files with 141 additions and 25 deletions

View File

@@ -2,8 +2,12 @@
import { ref } from 'vue';
import tooltipCategoryComponent from '@components/xml/tooltips/TooltipCategoryComponent.vue'
import tooltipEntryComponent from '@components/xml/tooltips/TooltipEntryComponent.vue'
import xpath1 from '@assets/tooltips/xpath/xpath1.json'
import xpath2 from '@assets/tooltips/xpath/xpath1.json'
const areTooltipsHidden = ref(true)
function toggleTooltips() {
areTooltipsHidden.value = !areTooltipsHidden.value;
}
@@ -16,15 +20,8 @@ function toggleTooltips() {
T<br/>o<br/>o<br/>l<br/>t<br/>i<br/>p<br/>s
</button>
<div id="content" :class="{'hidden' : areTooltipsHidden}" class="w-full flex flex-col gap-4 p-2 overflow-scroll rounded-xl dark:text-white bg-indigo-50 dark:bg-slate-800" >
<tooltipCategoryComponent name="Category I">
<tooltipEntryComponent name="Test"></tooltipEntryComponent>
<tooltipEntryComponent name="Teścik">Teścik</tooltipEntryComponent>
<tooltipEntryComponent name="Dłuuuuuuuggiiiiii teeeeeeeeeestttt"></tooltipEntryComponent>
</tooltipCategoryComponent>
<tooltipCategoryComponent name="Category II">
<tooltipEntryComponent name="Test"></tooltipEntryComponent>
<tooltipEntryComponent name="Teścik">Teścik</tooltipEntryComponent>
<tooltipEntryComponent name="Dłuuuuuuuggiiiiii teeeeeeeeeestttt"></tooltipEntryComponent>
<tooltipCategoryComponent v-for="category in xpath1" :name="category.name">
<tooltipEntryComponent v-for="entry in category.entries" :entry-data="entry"></tooltipEntryComponent>
</tooltipCategoryComponent>
</div>
</div>