mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-22 07:50:36 +01:00
feat(CommandPalette): new component (#80)
This commit is contained in:
@@ -47,6 +47,9 @@ export function extractShortcuts(items: any[] | any[][]) {
|
||||
if (item.children) {
|
||||
traverse(item.children.flat())
|
||||
}
|
||||
if (item.items) {
|
||||
traverse(item.items.flat())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user