mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
feat(CommandPalette): handle children in items (#4226)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -74,6 +74,51 @@ const groups = computed(() => [{
|
||||
toast.add({ title: 'Label added!' })
|
||||
},
|
||||
kbds: ['meta', 'L']
|
||||
}, {
|
||||
label: 'More actions',
|
||||
placeholder: 'Search actions...',
|
||||
children: [{
|
||||
label: 'Create new file',
|
||||
suffix: 'Create a new file in the current directory or workspace.',
|
||||
icon: 'i-lucide-file-plus',
|
||||
onSelect(e: Event) {
|
||||
e.preventDefault()
|
||||
|
||||
toast.add({ title: 'New file added!' })
|
||||
}
|
||||
}, {
|
||||
label: 'Create new folder',
|
||||
suffix: 'Create a new folder in the current directory or workspace.',
|
||||
icon: 'i-lucide-folder-plus',
|
||||
onSelect(e: Event) {
|
||||
e.preventDefault()
|
||||
|
||||
toast.add({ title: 'New folder added!' })
|
||||
}
|
||||
}, {
|
||||
label: 'Share',
|
||||
placeholder: 'Search share options...',
|
||||
icon: 'i-lucide-share',
|
||||
children: [{
|
||||
label: 'Share with everyone',
|
||||
suffix: 'Share with everyone in the current directory or workspace.',
|
||||
icon: 'i-lucide-share',
|
||||
onSelect(e: Event) {
|
||||
e.preventDefault()
|
||||
|
||||
toast.add({ title: 'Shared with everyone!' })
|
||||
}
|
||||
}, {
|
||||
label: 'Share with team',
|
||||
suffix: 'Share with the team in the current directory or workspace.',
|
||||
icon: 'i-lucide-users',
|
||||
onSelect(e: Event) {
|
||||
e.preventDefault()
|
||||
|
||||
toast.add({ title: 'Shared with team!' })
|
||||
}
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user