1.0.10 • Published 2 years ago

search-starnames v1.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Search Starnames

A search utility in vanillaJS to query availability of starnames

Usage

Include the script in the body of your html

<script src="https://unpkg.com/search-starnames"></script>

This script gets updated automatically whenever the actual utility package is updated on NPM

There are 3 elements hence 3 ID's to control styling

ComponentID
Search Inputstarname-search-input
Search Buttonstarname-search-button
Search Result Divstarname-search-result-div

All these 3 elements must be present in the document

Result Div behaviour:

This showcase how html inside search result div will appear on different cases

Case: Entering valid starname:

<p>
  Congrats <span>{starname}</span> is available
  <br />
  Register it <a href="...">Here</a>
</p>

OR

<p>Sorry <span>{starname}</span> is already taken</p>

Case: Entering invalid starname:

<p class="error">{ERROR_MESSAGE}</p>
1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago