feat(InputMenu): allows to customize labels (#2295)

This commit is contained in:
Eder Soares
2024-10-31 11:29:08 -03:00
committed by GitHub
parent 54e713d31a
commit ddf67a060b
3 changed files with 13 additions and 3 deletions

View File

@@ -75,12 +75,12 @@
<p v-if="query && !filteredOptions.length" :class="uiMenu.option.empty">
<slot name="option-empty" :query="query">
No results for "{{ query }}".
{{ uiMenu.default.optionEmpty.label.replace('{query}', query) }}
</slot>
</p>
<p v-else-if="!filteredOptions.length" :class="uiMenu.empty">
<slot name="empty" :query="query">
No options.
{{ uiMenu.default.empty.label }}
</slot>
</p>
</HComboboxOptions>

View File

@@ -53,7 +53,13 @@ export default {
},
default: {
selectedIcon: 'i-heroicons-check-20-solid',
trailingIcon: 'i-heroicons-chevron-down-20-solid'
trailingIcon: 'i-heroicons-chevron-down-20-solid',
empty: {
label: 'No options.'
},
optionEmpty: {
label: 'No results for "{query}".'
}
},
arrow: {
...arrow,