mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-15 04:29:37 +01:00
feat(table): add slot for empty state (#260)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
committed by
GitHub
parent
4e5e614eb4
commit
f7a34c8fee
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user