@internetarchive/ia-book-search-results

0.1.18 • Public • Published

Build Status codecov

<ia-book-search-results>

This webcomponent follows the open-wc recommendation.

Installation

npm i ia-book-search-results

or

yarn add @internetarchive/ia-menu-slider

Usage

<script type="module">
  import 'ia-book-search-results/ia-book-search-results.js';
</script>

<ia-book-search-results .query='bristol'></ia-book-search-results>

Supply the element with an optional array of search results to immediately render. Each result can have these properties:

{
  title: 'Book title', // The item's title
  cover: '//archive.org/img/cover.jpg', // The item's cover image
  hits: ['Hello {{{world}}}'], // Search results taken from the `matches` property in returned search results
}

Styling

ia-book-search-results {
  --primaryTextColor: #fff;
  --activeButtonBg: #282828;
  --searchResultText: #adaedc;
  --searchResultBg: #272958;
  --searchResultBorder: #fff;
}

Linting with ESLint

To scan the project for linting errors, run

npm run lint

Testing with Karma

To run the suite of karma tests, run

npm run test

To run the tests in watch mode (for TDD, for example), run

npm run test:watch

Tooling configs

For most of the tools, the configuration is in the package.json to reduce the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

Local Demo with es-dev-server

npm start

To run a local development server that serves the basic demo located in demo/index.html

Readme

Keywords

none

Package Sidebar

Install

npm i @internetarchive/ia-book-search-results

Weekly Downloads

1

Version

0.1.18

License

AGPL-3.0-only

Unpacked Size

70.4 kB

Total Files

17

Last publish

Collaborators

  • rebecca-shoptaw
  • jeffwklein
  • jim-at-ia
  • tracey.pooh
  • latonv
  • ibnesayeed
  • bfalling
  • mitraardron
  • vbanos
  • kngenie
  • iisa
  • cdrini
  • nsharma123
  • dualcnhq