diff --git a/apps/www/src/content/docs/components/dropdown-menu.md b/apps/www/src/content/docs/components/dropdown-menu.md new file mode 100644 index 00000000..ef1970a8 --- /dev/null +++ b/apps/www/src/content/docs/components/dropdown-menu.md @@ -0,0 +1,56 @@ +--- +title: Dropdown Menu +description: Displays a menu to the user — such as a set of actions or functions — triggered by a button. +source: https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/lib/registry/default/ui/dropdown-menu +primitive: https://www.radix-vue.com/components/dropdown-menu.html +--- + + + + + +## Installation + +```bash +npx shadcn-vue@latest add dropdown-menu +``` + + + +1. Install `radix-vue`: + +```bash +npm install radix-vue +``` + +2. Copy and paste the component source files linked at the top of this page into your project. + + +## Usage + +```vue + + + +``` \ No newline at end of file diff --git a/apps/www/src/lib/registry/default/examples/DropdownMenuDemo.vue b/apps/www/src/lib/registry/default/examples/DropdownMenuDemo.vue new file mode 100644 index 00000000..025a3aa1 --- /dev/null +++ b/apps/www/src/lib/registry/default/examples/DropdownMenuDemo.vue @@ -0,0 +1,124 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenu.vue b/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenu.vue index b2b57f0e..703c640d 100644 --- a/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenu.vue +++ b/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenu.vue @@ -1,11 +1,13 @@ diff --git a/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenuCheckboxItem.vue b/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenuCheckboxItem.vue index 55fb1f76..e16f6908 100644 --- a/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +++ b/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenuCheckboxItem.vue @@ -5,31 +5,26 @@ import { type DropdownMenuCheckboxItemProps, DropdownMenuItemIndicator, } from 'radix-vue' -import { cn } from '@/lib/utils' -import RadixIconsCheck from '~icons/radix-icons/check' +import { Check } from 'lucide-vue-next' +import { cn, useEmitAsProps } from '@/lib/utils' const props = defineProps() - const emits = defineEmits() diff --git a/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenuContent.vue b/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenuContent.vue index fb2e5941..69c96685 100644 --- a/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenuContent.vue +++ b/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenuContent.vue @@ -9,13 +9,13 @@ import { cn } from '@/lib/utils' const props = withDefaults( defineProps(), { - sideOffset: 6, + sideOffset: 4, }, )