@empathyco/x-components
Version:
Empathy X Components
23 lines (14 loc) • 1.14 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [/x-components](./x-components.md) > [SearchButton](./x-components.searchbutton.md)
## SearchButton variable
This component renders a button to submit the query.
**Signature:**
```typescript
_default: import("vue").DefineComponent<{}, {
dynamicClasses: import("vue").ComputedRef<VueCSSClasses>;
buttonRef: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
emitEvents: () => void;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>
```
## Remarks
If query is not empty, it emits [XEventsTypes.UserAcceptedAQuery](./x-components.xeventstypes.useracceptedaquery.md) and [SearchBoxXEvents.UserPressedSearchButton](./x-components.searchboxxevents.userpressedsearchbutton.md) events with the query as payload. It also adds `x-search-button--has-empty-query` as class when there is no query.