diff --git a/docs/components/content/examples/CommandPaletteExampleEmptySlot.vue b/docs/components/content/examples/CommandPaletteExampleEmptySlot.vue new file mode 100644 index 00000000..a64f7a14 --- /dev/null +++ b/docs/components/content/examples/CommandPaletteExampleEmptySlot.vue @@ -0,0 +1,10 @@ + diff --git a/docs/content/5.navigation/2.command-palette.md b/docs/content/5.navigation/2.command-palette.md index c81baca0..0170c8ea 100644 --- a/docs/content/5.navigation/2.command-palette.md +++ b/docs/content/5.navigation/2.command-palette.md @@ -357,6 +357,40 @@ padding: false Take a look at the component! :: +## Slots + +### `empty-state` :u-badge{label="Edge" class="ml-2 align-text-bottom !rounded-full"} + +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 65d04869..aa59bd61 100644 --- a/src/runtime/components/navigation/CommandPalette.vue +++ b/src/runtime/components/navigation/CommandPalette.vue @@ -51,12 +51,16 @@ -
-
+