mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
docs(dropdown-menu/context-menu): move class to ui.content
After a6ecef0f fix
This commit is contained in:
@@ -32,7 +32,7 @@ const items = computed(() => [{
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UContextMenu :items="items" class="w-48">
|
||||
<UContextMenu :items="items" :ui="{ content: 'w-48' }">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
|
||||
Right click here
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@ const items = [
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UContextMenu :items="items" class="w-48">
|
||||
<UContextMenu :items="items" :ui="{ content: 'w-48' }">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
|
||||
Right click here
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ const items = [{
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UContextMenu :items="items" class="w-48">
|
||||
<UContextMenu :items="items" :ui="{ content: 'w-48' }">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
|
||||
Right click here
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,7 @@ const items = computed(() => [{
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UDropdownMenu :items="items" :content="{ align: 'start' }" class="w-48">
|
||||
<UDropdownMenu :items="items" :content="{ align: 'start' }" :ui="{ content: 'w-48' }">
|
||||
<UButton label="Open" color="neutral" variant="outline" icon="i-lucide-menu" />
|
||||
</UDropdownMenu>
|
||||
</template>
|
||||
|
||||
@@ -25,7 +25,7 @@ const items = [
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UDropdownMenu :items="items" class="w-48">
|
||||
<UDropdownMenu :items="items" :ui="{ content: 'w-48' }">
|
||||
<UButton label="Open" color="neutral" variant="outline" icon="i-lucide-menu" />
|
||||
|
||||
<template #profile-trailing>
|
||||
|
||||
@@ -13,7 +13,7 @@ const items = [{
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UDropdownMenu :items="items" class="w-48">
|
||||
<UDropdownMenu :items="items" :ui="{ content: 'w-48' }">
|
||||
<UButton label="Open" color="neutral" variant="outline" icon="i-lucide-menu" />
|
||||
|
||||
<template #profile-trailing>
|
||||
|
||||
@@ -18,7 +18,7 @@ const items = [{
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UDropdownMenu v-model:open="open" :items="items" class="w-48">
|
||||
<UDropdownMenu v-model:open="open" :items="items" :ui="{ content: 'w-48' }">
|
||||
<UButton label="Open" color="neutral" variant="outline" icon="i-lucide-menu" />
|
||||
</UDropdownMenu>
|
||||
</template>
|
||||
|
||||
@@ -40,7 +40,7 @@ prettier: true
|
||||
collapse: true
|
||||
ignore:
|
||||
- items
|
||||
- class
|
||||
- ui.content
|
||||
external:
|
||||
- items
|
||||
props:
|
||||
@@ -90,7 +90,8 @@ props:
|
||||
- option
|
||||
- meta
|
||||
- j
|
||||
class: 'w-48'
|
||||
ui:
|
||||
content: 'w-48'
|
||||
slots:
|
||||
default: |
|
||||
|
||||
@@ -119,7 +120,7 @@ Use the `size` prop to change the size of the ContextMenu.
|
||||
prettier: true
|
||||
ignore:
|
||||
- items
|
||||
- class
|
||||
- ui.content
|
||||
external:
|
||||
- items
|
||||
props:
|
||||
@@ -131,7 +132,8 @@ props:
|
||||
icon: i-lucide-sun
|
||||
- label: Dark
|
||||
icon: i-lucide-moon
|
||||
class: 'w-48'
|
||||
ui:
|
||||
content: 'w-48'
|
||||
slots:
|
||||
default: |
|
||||
|
||||
@@ -152,7 +154,7 @@ Use the `disabled` prop to disable the ContextMenu.
|
||||
prettier: true
|
||||
ignore:
|
||||
- items
|
||||
- class
|
||||
- ui.content
|
||||
external:
|
||||
- items
|
||||
props:
|
||||
@@ -164,7 +166,8 @@ props:
|
||||
icon: i-lucide-sun
|
||||
- label: Dark
|
||||
icon: i-lucide-moon
|
||||
class: 'w-48'
|
||||
ui:
|
||||
content: 'w-48'
|
||||
slots:
|
||||
default: |
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ prettier: true
|
||||
collapse: true
|
||||
ignore:
|
||||
- items
|
||||
- class
|
||||
- ui.content
|
||||
external:
|
||||
- items
|
||||
props:
|
||||
@@ -91,7 +91,8 @@ props:
|
||||
- shift
|
||||
- meta
|
||||
- q
|
||||
class: 'w-48'
|
||||
ui:
|
||||
content: 'w-48'
|
||||
slots:
|
||||
default: |
|
||||
|
||||
@@ -118,7 +119,7 @@ Use the `content` prop to control how the DropdownMenu content is rendered, like
|
||||
prettier: true
|
||||
ignore:
|
||||
- items
|
||||
- class
|
||||
- ui.content
|
||||
external:
|
||||
- items
|
||||
items:
|
||||
@@ -143,7 +144,8 @@ props:
|
||||
align: start
|
||||
side: bottom
|
||||
sideOffset: 8
|
||||
class: 'w-48'
|
||||
ui:
|
||||
content: 'w-48'
|
||||
slots:
|
||||
default: |
|
||||
|
||||
@@ -163,7 +165,7 @@ prettier: true
|
||||
ignore:
|
||||
- arrow
|
||||
- items
|
||||
- class
|
||||
- ui.content
|
||||
external:
|
||||
- items
|
||||
props:
|
||||
@@ -175,7 +177,8 @@ props:
|
||||
icon: i-lucide-credit-card
|
||||
- label: Settings
|
||||
icon: i-lucide-cog
|
||||
class: 'w-48'
|
||||
ui:
|
||||
content: 'w-48'
|
||||
slots:
|
||||
default: |
|
||||
|
||||
@@ -194,8 +197,8 @@ Use the `size` prop to control the size of the DropdownMenu.
|
||||
prettier: true
|
||||
ignore:
|
||||
- items
|
||||
- class
|
||||
- content.align
|
||||
- ui.content
|
||||
external:
|
||||
- items
|
||||
props:
|
||||
@@ -209,7 +212,8 @@ props:
|
||||
icon: i-lucide-cog
|
||||
content:
|
||||
align: start
|
||||
class: 'w-48'
|
||||
ui:
|
||||
content: 'w-48'
|
||||
slots:
|
||||
default: |
|
||||
|
||||
@@ -236,7 +240,7 @@ Use the `disabled` prop to disable the DropdownMenu.
|
||||
prettier: true
|
||||
ignore:
|
||||
- items
|
||||
- class
|
||||
- ui.content
|
||||
external:
|
||||
- items
|
||||
props:
|
||||
@@ -248,7 +252,8 @@ props:
|
||||
icon: i-lucide-credit-card
|
||||
- label: Settings
|
||||
icon: i-lucide-cog
|
||||
class: 'w-48'
|
||||
ui:
|
||||
content: 'w-48'
|
||||
slots:
|
||||
default: |
|
||||
|
||||
|
||||
@@ -105,13 +105,13 @@ defineShortcuts(extractShortcuts(items.value))
|
||||
<USelect v-model="size" :items="sizes" placeholder="Size" />
|
||||
</div>
|
||||
|
||||
<UContextMenu :items="items" class="min-w-48" :size="size">
|
||||
<UContextMenu :items="items" :ui="{ content: 'w-48' }" :size="size">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
|
||||
Right click here
|
||||
</div>
|
||||
</UContextMenu>
|
||||
|
||||
<UContextMenu :items="itemsWithColor" class="min-w-48" :size="size">
|
||||
<UContextMenu :items="itemsWithColor" :ui="{ content: 'w-48' }" :size="size">
|
||||
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
|
||||
Color right click here
|
||||
</div>
|
||||
|
||||
@@ -140,7 +140,7 @@ defineShortcuts(extractShortcuts(items.value))
|
||||
<div class="flex flex-col items-center gap-8">
|
||||
<USelectMenu v-model="size" :items="sizes" placeholder="Size" />
|
||||
|
||||
<UDropdownMenu :items="items" :size="size" arrow :content="{ side: 'bottom', align: 'start' }" class="min-w-48">
|
||||
<UDropdownMenu :items="items" :size="size" arrow :content="{ side: 'bottom', align: 'start' }" :ui="{ content: 'w-48' }">
|
||||
<UButton label="Open" color="neutral" variant="outline" icon="i-lucide-menu" />
|
||||
|
||||
<template #custom-trailing>
|
||||
@@ -148,7 +148,7 @@ defineShortcuts(extractShortcuts(items.value))
|
||||
</template>
|
||||
</UDropdownMenu>
|
||||
|
||||
<UDropdownMenu :items="itemsWithColor" :size="size" arrow :content="{ side: 'bottom', align: 'start' }" class="min-w-48">
|
||||
<UDropdownMenu :items="itemsWithColor" :size="size" arrow :content="{ side: 'bottom', align: 'start' }" :ui="{ content: 'w-48' }">
|
||||
<UButton label="Color" color="neutral" variant="outline" icon="i-lucide-menu" />
|
||||
|
||||
<template #custom-trailing>
|
||||
|
||||
Reference in New Issue
Block a user