Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
move v-tooltip prop to global config
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Aug 14, 2023
1 parent 0042759 commit aff3772
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/layout/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
No product types are defined.
</div>
<div v-if="loaded || empty" class="px-5 py-0 text-right">
<v-tooltip left open-delay="800">
<v-tooltip>
<template v-slot:activator="{ props: tooltip }">
<v-dialog persistent v-model="addDialog" max-width="800">
<template v-slot:activator="{ props: addDialog }">
Expand Down
2 changes: 1 addition & 1 deletion src/components/product/FormRelations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
></v-autocomplete>
</v-card-text>
<v-card-actions>
<v-tooltip bottom open-delay="800">
<v-tooltip>
<template v-slot:activator="{ props }">
<v-btn
icon
Expand Down
2 changes: 1 addition & 1 deletion src/components/utils/ToggleDarkModeButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-tooltip location="top end" open-delay="800">
<v-tooltip location="top end">
<template #activator="{ props }">
<v-btn v-bind="props" variant="text" icon @click="toggleDark()">
<v-icon v-if="isDark" icon="mdi-weather-night"></v-icon>
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/vuetify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ const vuetify = createVuetify({
sets: { mdi },
},
defaults: {
// https://vuetifyjs.com/en/features/global-configuration/
VTooltip: {
openDelay: 800,
},
VAppBar: {
// color: "surface-container",
},
Expand Down
4 changes: 2 additions & 2 deletions src/views/product/ProductItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
>
<div style="max-width: 960px; margin: auto">
<div class="top-bar">
<v-tooltip v-if="node && node.type_" bottom open-delay="800">
<v-tooltip v-if="node && node.type_" location="top">
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
Expand All @@ -21,7 +21,7 @@
</template>
<span>Back to the list</span>
</v-tooltip>
<v-tooltip bottom open-delay="800">
<v-tooltip location="top">
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
Expand Down
6 changes: 3 additions & 3 deletions src/views/product/ProductList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<v-alert variant="tonal" type="error" :text="error"> </v-alert>
</div>
<div class="top-bar">
<v-tooltip bottom open-delay="800">
<v-tooltip>
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
Expand All @@ -23,7 +23,7 @@
<span v-else>{{ nItemsTotal }} {{ productType.plural }}</span>
</div>
<div v-if="loaded && nItemsTotal > 1">
<v-tooltip bottom open-delay="800">
<v-tooltip>
<template v-slot:activator="{ props: tooltip }">
<v-menu left offset-y>
<template v-slot:activator="{ props: menu }">
Expand Down Expand Up @@ -51,7 +51,7 @@
</v-tooltip>
</div>
<div v-if="loaded">
<v-tooltip bottom open-delay="800">
<v-tooltip>
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
Expand Down
2 changes: 1 addition & 1 deletion src/views/product/ProductTop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</span>
</span>
<span v-if="!itemName">
<v-tooltip left open-delay="800">
<v-tooltip>
<template v-slot:activator="{ props: tooltip }">
<v-dialog persistent v-model="editDialog" max-width="800">
<template v-slot:activator="{ props: editDialog }">
Expand Down

0 comments on commit aff3772

Please sign in to comment.