Skip to content

Commit

Permalink
Slots documentation improvements
Browse files Browse the repository at this point in the history
- adds missing documentation to 'KIconButton'
- fixes 'menu' slot documentation not being generated for 'KButton'
- uses language consistent with other slots documentation
  • Loading branch information
MisRob committed Sep 6, 2022
1 parent 652a86c commit 3ab6d61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/buttons-and-links/KButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
data-test="iconBefore"
class="prop-icon"
/>
<!-- @slot Pass sub-components into the button, typically `KDropdownMenu` -->
<slot name="menu"></slot>
<!-- @slot Pass sub-components into the button, which provides more flexibility -->
<!-- @slot no longer takes prescendence over text. Both slot and text can now be used -->
<!-- @slot Slot alternative to the `text` prop -->
<slot v-if="$slots.default"></slot>

<template>
Expand Down
1 change: 1 addition & 0 deletions lib/buttons-and-links/KIconButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</UiTooltip>
<!-- UiIconButton used flexbox - 7px is the magic centering number -->
<KIcon :icon="icon" :color="color" :style="iconStyles" />
<!-- @slot Pass sub-components into the button, typically `KDropdownMenu` -->
<slot name="menu"></slot>
</KButton>

Expand Down

0 comments on commit 3ab6d61

Please sign in to comment.