Skip to content

Commit

Permalink
docs(menu): improve use menu example
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem committed Dec 8, 2023
1 parent d0dce4b commit 234ff72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<ul>
<ul class="va-unordered">
<li
v-for="user in 4"
:key="user"
Expand All @@ -11,7 +11,7 @@
{ text: 'Delete', icon: 'delete' },
],
onSelected(option) {
console.log(option, user)
alert(option.text + ' ' + user)
},
})"
>
Expand All @@ -24,4 +24,6 @@
import { useMenu } from 'vuestic-ui';
const { show } = useMenu()
const alert = (...args) => window.alert(...args)
</script>
2 changes: 1 addition & 1 deletion packages/docs/page-config/ui-elements/menu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default definePageConfig({
}),
block.example("UseMenu", {
title: "useMenu",
description: "You can use `useMenu` hook to show menu programmatically.",
description: "You can use `useMenu` hook to show menu programmatically. `useMenu` will listen for right click to show menu.",
}),

block.example("Icon", {
Expand Down

0 comments on commit 234ff72

Please sign in to comment.