From ffc81cc9504abca6c13fbb19e46551c218878bef Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Mon, 25 Nov 2024 14:39:15 +0100 Subject: [PATCH] chore(CommandPalette): pass `active` to children --- src/runtime/components/CommandPalette.vue | 12 +-- test/components/CommandPalette.spec.ts | 6 +- .../CommandPalette-vue.spec.ts.snap | 88 +++++++++---------- .../__snapshots__/CommandPalette.spec.ts.snap | 88 +++++++++---------- 4 files changed, 97 insertions(+), 97 deletions(-) diff --git a/src/runtime/components/CommandPalette.vue b/src/runtime/components/CommandPalette.vue index aaa68fd3..b6ef1ff1 100644 --- a/src/runtime/components/CommandPalette.vue +++ b/src/runtime/components/CommandPalette.vue @@ -283,25 +283,25 @@ const groups = computed(() => { - - + + - + {{ item.prefix }} - + - + diff --git a/test/components/CommandPalette.spec.ts b/test/components/CommandPalette.spec.ts index 64d216e8..0f49a84b 100644 --- a/test/components/CommandPalette.spec.ts +++ b/test/components/CommandPalette.spec.ts @@ -9,7 +9,8 @@ describe('CommandPalette', () => { label: 'Add new file', suffix: 'Create a new file in the current directory or workspace.', icon: 'i-lucide-file-plus', - kbds: ['meta', 'N'] + kbds: ['meta', 'N'], + active: true }, { label: 'Add new folder', suffix: 'Create a new folder in the current directory or workspace.', @@ -54,8 +55,7 @@ describe('CommandPalette', () => { label: 'benjamincanac', avatar: { src: 'https://github.com/benjamincanac.png' - }, - active: true + } }] }] diff --git a/test/components/__snapshots__/CommandPalette-vue.spec.ts.snap b/test/components/__snapshots__/CommandPalette-vue.spec.ts.snap index 4800b71a..c541a7c5 100644 --- a/test/components/__snapshots__/CommandPalette-vue.spec.ts.snap +++ b/test/components/__snapshots__/CommandPalette-vue.spec.ts.snap @@ -11,7 +11,7 @@ exports[`CommandPalette > renders with as correctly 1`] = `