This project was bootstrapped with Create React App.
In the project directory, you can run:
Install all the dependencies required for the project to run.
Launch the app in development mode.
See public/index.html
<scriptsrc="https://cdn.jsdelivr.net/npm/addsearch-js-client@0.8/dist/addsearch-js-client.min.js"></script><scriptsrc="https://cdn.jsdelivr.net/npm/addsearch-search-ui@0.8/dist/addsearch-search-ui.min.js"></script><linkrel="stylesheet" href="https://cdn.jsdelivr.net/npm/addsearch-search-ui@0.8/dist/addsearch-search-ui.min.css" />See src/addsearch-ui-components/SearchField for example. Then use the encapsulated component in your React TypeScript project.
See App.tsx:
<SearchFielduiInstance={addSearchUI}button="Search.."searchAsYouType={true}/>Give type definition to the props of the SearchField component. Component's setting can be found here: https://www.npmjs.com/package/addsearch-search-ui
interfaceAddSearchSearchFieldProps{uiInstance: UIInstanceProps;button?: string;searchAsYouType?: boolean;}