feat(CommandPalette): new component (#80)

This commit is contained in:
Benjamin Canac
2024-04-30 18:14:18 +02:00
committed by GitHub
parent 559a8cba58
commit d0017bf847
30 changed files with 1832 additions and 125 deletions

View File

@@ -47,6 +47,9 @@ export function extractShortcuts(items: any[] | any[][]) {
if (item.children) {
traverse(item.children.flat())
}
if (item.items) {
traverse(item.items.flat())
}
})
}

View File

@@ -3,11 +3,20 @@ import { useAppConfig } from '#imports'
export interface UseComponentIconsProps {
icon?: string
/** When `true`, the icon will be displayed on the left side. */
leading?: boolean
/** Display an icon on the left side. */
leadingIcon?: string
/** When `true`, the icon will be displayed on the right side. */
trailing?: boolean
/** Display an icon on the right side. */
trailingIcon?: string
/** When `true`, the loading icon will be displayed. */
loading?: boolean
/**
* The icon when the `loading` prop is `true`.
* @defaultValue `appConfig.ui.icons.loading`
*/
loadingIcon?: string
}