Skip to content

Commit

Permalink
feat(table): add slot fot empty state
Browse files Browse the repository at this point in the history
  • Loading branch information
Haythamasalama committed Jun 7, 2023
1 parent d91c0bb commit 06f15fa
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/runtime/components/data/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@

<tr v-if="emptyState && !rows.length">
<td :colspan="columns.length">
<div :class="ui.emptyState.wrapper">
<UIcon v-if="emptyState.icon" :name="emptyState.icon" :class="ui.emptyState.icon" aria-hidden="true" />
<p :class="ui.emptyState.label">
{{ emptyState.label }}
</p>
</div>
<slot name="empty-state">
<div :class="ui.emptyState.wrapper">
<UIcon v-if="emptyState.icon" :name="emptyState.icon" :class="ui.emptyState.icon" aria-hidden="true" />
<p :class="ui.emptyState.label">
{{ emptyState.label }}
</p>
</div>
</slot>
</td>
</tr>
</tbody>
Expand Down

0 comments on commit 06f15fa

Please sign in to comment.