diff --git a/src/runtime/components/Tabs.vue b/src/runtime/components/Tabs.vue index 94591994..d602b744 100644 --- a/src/runtime/components/Tabs.vue +++ b/src/runtime/components/Tabs.vue @@ -38,12 +38,13 @@ export type TabsSlots = { diff --git a/test/components/Tabs.spec.ts b/test/components/Tabs.spec.ts index ecf75c7b..52d1e217 100644 --- a/test/components/Tabs.spec.ts +++ b/test/components/Tabs.spec.ts @@ -22,7 +22,7 @@ describe('Tabs', () => { ['with modelValue', { props: { items, modelValue: '1' } }], ['with defaultValue', { props: { items, defaultValue: '1' } }], ['with default slot', { props: { items }, slots: { default: () => 'Default slot' } }], - ['with item slot', { props: { items }, slots: { item: () => 'Item slot' } }] + ['with content slot', { props: { items }, slots: { content: () => 'Content slot' } }] ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TabsProps, slots?: any }) => { const html = await ComponentRender(nameOrHtml, options, Tabs) expect(html).toMatchSnapshot() diff --git a/test/components/__snapshots__/Tabs.spec.ts.snap b/test/components/__snapshots__/Tabs.spec.ts.snap index 14a49f55..6d3301c0 100644 --- a/test/components/__snapshots__/Tabs.spec.ts.snap +++ b/test/components/__snapshots__/Tabs.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Tabs > renders basic case correctly 1`] = ` -"
+"
@@ -12,7 +12,7 @@ exports[`Tabs > renders basic case correctly 1`] = ` `; exports[`Tabs > renders with class correctly 1`] = ` -"
+"
@@ -22,8 +22,19 @@ exports[`Tabs > renders with class correctly 1`] = `
" `; +exports[`Tabs > renders with content slot correctly 1`] = ` +"
+
+
+
+
Content slot
+ + +
" +`; + exports[`Tabs > renders with default slot correctly 1`] = ` -"
+"
@@ -34,7 +45,7 @@ exports[`Tabs > renders with default slot correctly 1`] = ` `; exports[`Tabs > renders with defaultValue correctly 1`] = ` -"
+"
@@ -44,19 +55,8 @@ exports[`Tabs > renders with defaultValue correctly 1`] = `
" `; -exports[`Tabs > renders with item slot correctly 1`] = ` -"
-
-
-
-
This is the content shown for Tab1
- - -
" -`; - exports[`Tabs > renders with modelValue correctly 1`] = ` -"
+"
@@ -67,7 +67,7 @@ exports[`Tabs > renders with modelValue correctly 1`] = ` `; exports[`Tabs > renders with orientation correctly 1`] = ` -"
+"
@@ -78,7 +78,7 @@ exports[`Tabs > renders with orientation correctly 1`] = ` `; exports[`Tabs > renders with ui correctly 1`] = ` -"
+"