mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
feat(CommandPalette): handle empty-state (#271)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b4a96a8b01
commit
652af93f5c
@@ -51,12 +51,16 @@
|
||||
</CommandPaletteGroup>
|
||||
</ComboboxOptions>
|
||||
|
||||
<div v-else-if="emptyState" :class="ui.emptyState.wrapper">
|
||||
<UIcon v-if="emptyState.icon" :name="emptyState.icon" :class="ui.emptyState.icon" aria-hidden="true" />
|
||||
<p :class="query ? ui.emptyState.queryLabel : ui.emptyState.label">
|
||||
{{ query ? emptyState.queryLabel : emptyState.label }}
|
||||
</p>
|
||||
</div>
|
||||
<template v-else-if="emptyState">
|
||||
<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="query ? ui.emptyState.queryLabel : ui.emptyState.label">
|
||||
{{ query ? emptyState.queryLabel : emptyState.label }}
|
||||
</p>
|
||||
</div>
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
</Combobox>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user