Skip to content

Commit

Permalink
chore(#9): add slots (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher authored Oct 3, 2023
1 parent d4b47e4 commit de40a20
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
:level="level"
:theme="theme"
:type="type"
/>
>
<slot :name="`item-${item.id}`" v-bind="{ item, level, theme, type }" />
</CTMenuItem>
</slot>
</ul>
</template>
Expand Down
12 changes: 7 additions & 5 deletions src/components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
:text="title"
/>
<div class="ct-navigation__items">
<CTMenu
class="ct-navigation__menu"
:theme="theme"
:items="items"
/>
<slot>
<CTMenu
class="ct-navigation__menu"
:theme="theme"
:items="items"
/>
</slot>
</div>
</div>
</template>
Expand Down

0 comments on commit de40a20

Please sign in to comment.