searchcraft-popover-button
Renders a button which, when clicked, turns on popover visibility.
Import
Section titled “Import”import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";<searchcraft-popover-button> Open popover</searchcraft-popover-button>const popoverButton = document.querySelector('searchcraft-popover-button');
popoverButton.template = ({ isPopoverVisible }, { html }) => html` <span>Click me</span>`;<SearchcraftPopoverButton template={({ isPopoverVisible }, { html }) => html` <span>Click me</span> `}> Open popover</SearchcraftPopoverButton><SearchcraftPopoverButton :template={({ isPopoverVisible }, { html }) => html` <span>Click me</span> `}> Open popover</SearchcraftPopoverButton>Properties
Section titled “Properties”| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
searchcraftId | searchcraft-id | The id of the Searchcraft instance that this component should use. | string | undefined | undefined |
template | — | A callback function responsible for rendering the button contents. | ((data: { isPopoverVisible: boolean; }, utils: { html: TemplateHtml; }) => string) | undefined | undefined |
type | type | The type of popover button to render. | "skeuomorphic" | undefined | undefined |