Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion src/components/NcDashboardWidget/NcDashboardWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,41 @@ export default {
</script>
```

### Showing items and a half empty content message
```vue
<template>
<NcDashboardWidget :items="items"
:show-items-and-empty-content="true"
:half-empty-content-message="'No unread items'">
<template #default="{ item }">
{{ item.title }}
</template>
</NcDashboardWidget>
</template>

<script>
const myItems = [
{
title: 'first',
content: 'blabla',
},
{
title: 'second',
content: 'fuzzfuzz',
},
]
export default {
name: 'MyDashboardWidget',
props: [],
data() {
return {
items: myItems
}
},
}
</script>
```

### Complete example using NcDashboardWidgetItem

```vue
Expand Down Expand Up @@ -140,7 +175,7 @@ export default {
<div class="dashboard-widget">
<!-- This element is shown if we have items, but want to show a general message as well.
Can be used e.g. to show "No mentions" on top of the item list. -->
<NcEmptyContent v-if="showHalfNcArea"
<NcEmptyContent v-if="showHalfEmptyContentArea"
:description="halfEmptyContentString"
class="half-screen">
<template #icon>
Expand Down