docs(tooltip): update

This commit is contained in:
Benjamin Canac
2024-07-30 16:46:49 +02:00
parent cae27d5206
commit 8f82a65f03
2 changed files with 8 additions and 5 deletions

View File

@@ -1,11 +1,8 @@
<script setup lang="ts">
const open = ref(true)
// Note: This is for demonstration purposes only. Don't do this at home.
onMounted(() => {
setInterval(() => {
open.value = !open.value
}, 1000)
defineShortcuts({
o: () => open.value = !open.value
})
</script>

View File

@@ -11,6 +11,8 @@ links:
## Usage
Use a [Button](/components/button) or any other component in the default slot of the Tooltip.
::important
Make sure to wrap your app with the [`App`](/components/app) component to make the Tooltip work properly.
::
@@ -172,6 +174,10 @@ props:
---
::
::note
In this example, press :kbd{value="O"} to toggle the Tooltip.
::
## API
### Props