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