chore(CommandPalette): define placeholder from InputProps

This commit is contained in:
Benjamin Canac
2024-05-02 10:41:02 +02:00
parent d0017bf847
commit f039d1a7dd
2 changed files with 6 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ import type { UseFuseOptions } from '@vueuse/integrations/useFuse'
import _appConfig from '#build/app.config'
import theme from '#build/ui/command-palette'
import type { UseComponentIconsProps } from '#ui/composables/useComponentIcons'
import type { AvatarProps, ButtonProps, ChipProps, KbdProps } from '#ui/types'
import type { AvatarProps, ButtonProps, ChipProps, KbdProps, InputProps } from '#ui/types'
import type { DynamicSlots } from '#ui/types/utils'
const appConfig = _appConfig as AppConfig & { ui: { commandPalette: Partial<typeof theme> } }
@@ -45,11 +45,7 @@ export interface CommandPaletteProps<G, T> extends Pick<ComboboxRootProps, 'as'
* @defaultValue `appConfig.ui.icons.check`
*/
selectedIcon?: string
/**
* The placeholder text when the input is empty.
* @defaultValue `'Type a command or search...'`
*/
placeholder?: string
placeholder?: InputProps['placeholder']
/** Display a close button in the input, clicking it will emit the `close` event. */
close?: ButtonProps | boolean
groups?: G[]

View File

@@ -16,6 +16,10 @@ export interface InputProps extends UseComponentIconsProps {
id?: string
name?: string
type?: InputHTMLAttributes['type']
/**
* The placeholder text when the input is empty.
* @defaultValue `'Type a command or search...'`
*/
placeholder?: string
color?: InputVariants['color']
variant?: InputVariants['variant']