@empathyco/x-components
Version:
Empathy X Components
23 lines (14 loc) • 1.06 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/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>;
emitEvents: () => void;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>
```
## 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.