@bilions/search-js
Version:
Instance search UI component
38 lines (37 loc) • 938 B
TypeScript
import { SearchJSItem } from '../types';
interface ItemComponentPayload {
item: SearchJSItem;
icon: string;
hideRemoveButton: boolean;
}
export interface ListRenderPayload {
id: string;
items?: Array<SearchJSItem>;
icon: string;
hideRemoveButton: boolean;
notFoundLabel: string;
}
export declare class Item {
/**
* render item list
*
* @param {Array<SearchJSItem>} items
* @returns {void}
*/
renderList({ id, items, hideRemoveButton, notFoundLabel, icon }: ListRenderPayload): void;
/**
* render items component
* @param {ItemComponentPayload} props
* @returns {string}
*/
render({ item, icon, hideRemoveButton }: ItemComponentPayload): string;
/**
* get html string to show or hide remove button
*
* @param {boolean} hideRemoveButton
* @param {string} data
* @returns
*/
private getCloseIcon;
}
export {};