Skip to content

Commit

Permalink
Add Action Slot to emptyContent
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
  • Loading branch information
jotoeri committed Aug 21, 2022
1 parent 758e913 commit 380a1a3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/NcEmptyContent/NcEmptyContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ export default {
<!-- @slot Optional description -->
<slot name="desc" />
</p>
<p v-if="hasAction">
<!-- @slot Optional slot to insert a button -->
<slot name="action" />
</p>
</div>
</template>

Expand Down Expand Up @@ -105,6 +109,10 @@ export default {
return this.slots?.desc !== undefined
&& this.slots?.desc[0]?.text
},

hasAction() {
return this.slots.action !== undefined
},
},
}
</script>
Expand Down

0 comments on commit 380a1a3

Please sign in to comment.