diff --git a/docs/components/content/examples/CommandPaletteExampleEmptySlot.vue b/docs/components/content/examples/CommandPaletteExampleEmptySlot.vue new file mode 100644 index 0000000000..d0da152365 --- /dev/null +++ b/docs/components/content/examples/CommandPaletteExampleEmptySlot.vue @@ -0,0 +1,14 @@ + diff --git a/docs/content/5.navigation/2.command-palette.md b/docs/content/5.navigation/2.command-palette.md index 09f74f5218..1e635d9e0f 100644 --- a/docs/content/5.navigation/2.command-palette.md +++ b/docs/content/5.navigation/2.command-palette.md @@ -357,6 +357,44 @@ padding: false Take a look at the component! :: +## Slots + +### `empty-state` + +Use the `#empty-state` slot to customize the empty state. + +::component-example{class="grid"} +--- +padding: false +overflowClass: 'overflow-x-auto' +--- + +#default +:command-palette-example-empty-slot{class="flex-1"} + +#code +```vue + + + +``` +:: + ## Props :component-props diff --git a/src/runtime/components/navigation/CommandPalette.vue b/src/runtime/components/navigation/CommandPalette.vue index 65d0486958..d7e69616a6 100644 --- a/src/runtime/components/navigation/CommandPalette.vue +++ b/src/runtime/components/navigation/CommandPalette.vue @@ -52,10 +52,12 @@
-