0.1.0 • Published 10 months ago

macross-suggestion-box v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

RWS Universal Suggestion Box

Suggestion Box that can be used in all RWS component.

npm.io

npm.io

Usage:

<script>
  window.addEventListener('load', function () {
    const script = document.createElement('script');
    script.src = 'https://www.unpkg.com/macross-suggestion-box@latest/dist/suggestion-box.umd.js';
    script.type = 'text/javascript';
    script.addEventListener('load', function () {
      const SuggestionBox = window.suggestionBox.SuggestionBox;
      new SuggestionBox('search_input_id', {
        baseUrl: 'https://searchSuggestionAPIEndpoint/',
        sid: 'sid',
      });
    });
    document.head.appendChild(script);
  });
</script>

Parameters:

  • 'search_input_id' is the search input id
  • baseURL and sid
0.1.0

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago