feat(ContextMenu/DropdownMenu/NavigationMenu): add external-icon prop

Resolves #2996
This commit is contained in:
Benjamin Canac
2025-02-14 15:00:06 +01:00
parent ba3ed86ae1
commit 5846c1e2ee
14 changed files with 607 additions and 8 deletions

View File

@@ -34,8 +34,7 @@ describe('ContextMenu', () => {
label: 'Dark',
icon: 'i-lucide-moon'
}]
}],
[{
}], [{
label: 'Show Sidebar',
color: 'primary',
kbds: ['meta', 'S']
@@ -69,6 +68,11 @@ describe('ContextMenu', () => {
kbds: ['option', 'meta', 'J'],
slot: 'custom'
}]]
}], [{
label: 'GitHub',
icon: 'i-simple-icons-github',
to: 'https://github.com/nuxt/ui',
target: '_blank'
}]
]
@@ -80,6 +84,8 @@ describe('ContextMenu', () => {
['with labelKey', { props: { ...props, labelKey: 'icon' } }],
['with disabled', { props: { ...props, disabled: true } }],
...sizes.map((size: string) => [`with size ${size}`, { props: { ...props, size } }]),
['with externalIcon', { props: { ...props, externalIcon: 'i-lucide-external-link' } }],
['without externalIcon', { props: { ...props, externalIcon: false } }],
['with class', { props: { ...props, class: 'min-w-96' } }],
['with ui', { props: { ...props, ui: { itemLeadingIcon: 'size-4' } } }],
// Slots