UNPKG

@empathyco/x-components

Version:
34 lines (31 loc) 1.08 kB
import { defineComponent } from 'vue'; import { useState } from '../../../composables/use-state.js'; import { searchXModule } from '../x-module.js'; /** * The `Spellcheck` component allows to inform the user with a friendly message that he * might have misspelled the search query. This message can be set using the default slot * of the component, which gives access to the searched query using the `query` scope property, * and the spellchecked query proposal, using the `spellcheckedQuery` scope property. * * The component will only render itself if the `spellcheckedQuery` property has value. * * @public */ var _sfc_main = defineComponent({ name: 'Spellcheck', xModule: searchXModule.name, setup() { /** * The query and the spellcheckedQuery from the search state. * * @public */ const { query, spellcheckedQuery } = useState('search'); return { query, spellcheckedQuery, }; }, }); export { _sfc_main as default }; //# sourceMappingURL=spellcheck.vue2.js.map