@internetarchive/ia-book-downloads
v0.1.5
Published
Book downloads pane for ia-menu-slider
Downloads
3
Maintainers
Keywords
Readme
<ia-book-downloads>
This webcomponent follows the open-wc recommendation.
Installation
npm i ia-book-downloads
or
yarn add @internetarchive/ia-book-downloads
Usage
<script type="module">
import 'ia-book-downloads/ia-book-downloads.js';
</script>
<ia-book-downloads></ia-book-downloads>
Supply the element with an optional array of download options to immediately render. Each result can have these properties:
{
type: 'Encrypted Adobe PDF', // Button text
url: '#', // The URL to the downloadable item
note: 'PDF files contain high quality images of pages.', // Optional note to render below the button
}
Styling
ia-book-downloads {
--downloadButtonColor: #fff;
--downloadButtonBg: #547fba;
--externalButtonColor: #547fba;
--externalButtonBg: #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