Skip to content

Commit

Permalink
fix: issues with slots
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Apr 24, 2024
1 parent ec3345e commit abbcbcd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const comp: any = (
<a href="#">Sub1</a>
</DBNavigationItem>
}>
{/*<template v-slot:subnavigation>
{/*<template v-slot:sub-navigation>
<DBNavigationItem data-testid="sub1">
<a href="#">Sub1</a>
</DBNavigationItem>
Expand Down
6 changes: 3 additions & 3 deletions showcases/vue-showcase/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const sortedNavigation = getSortedNavigationItems(navigationItems);
<NavItemComponent :navItem="item"></NavItemComponent>
</template>
</DBNavigation>
<template v-slot:calltoaction>
<template v-slot:call-to-action>
<DBButton
icon="magnifying_glass"
variant="ghost"
Expand All @@ -98,7 +98,7 @@ const sortedNavigation = getSortedNavigationItems(navigationItems);
Search
</DBButton>
</template>
<template v-slot:actionbar>
<template v-slot:action-bar>
<DBButton icon="user" variant="ghost" :no-text="true">
Profile
</DBButton>
Expand All @@ -113,7 +113,7 @@ const sortedNavigation = getSortedNavigationItems(navigationItems);
Help
</DBButton>
</template>
<template v-slot:metanavigation>
<template v-slot:meta-navigation>
<DBSelect
label="Density"
variant="floating"
Expand Down
2 changes: 1 addition & 1 deletion showcases/vue-showcase/src/NavItemComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defineProps<{

<template>
<DBNavigationItem :backButtonText="`Back to ${navItem.label}`">
<template v-if="navItem.subNavigation" v-slot:subnavigation>
<template v-if="navItem.subNavigation" v-slot:sub-navigation>
<template v-for="item of navItem.subNavigation">
<NavItemComponent :navItem="item"></NavItemComponent>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DefaultComponent from "../DefaultComponent.vue";
import defaultComponentVariants from "../../../../shared/navigation-item.json";
import { DBNavigationItem } from "../../../../../output/vue/src";
const log = (exampleName: string) => {
const log = (exampleName?: string) => {
// eslint-disable-next-line no-alert
alert(exampleName);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import { DBNavigation, DBNavigationItem } from "../../../../../output/vue/src";
<DBNavigation>
<DBNavigationItem :active="true">
Navi-Item 1
<template v-slot:subnavigation>
<template v-slot:sub-navigation>
<DBNavigationItem :active="true">
Sub-Navi-Item 1

<template v-slot:subnavigation>
<template v-slot:sub-navigation>
<DBNavigationItem :active="true">
<a href="#">Sub-Sub-Navi-Item 1</a>
</DBNavigationItem>
Expand Down

0 comments on commit abbcbcd

Please sign in to comment.