@internetarchive/toast-manager
v0.1.0
Published
A Toast Manager Web Component
Downloads
3
Maintainers
Keywords
Readme
Toast Manager Component
A Toast manager built on LitElement with support for custom content and light DOM elements.
Installation
yarn add @internetarchive/toast-manager
Usage
<!-- index.html -->
<script type="module">
import '@internetarchive/toast-manager';
import { ToastConfig } from '@internetarchive/toast-manager';
</script>
<toast-template></toast-template>
Config Options
All of the config options:
const config = new ToastConfig();
config.texts = 'Thank you for your support!1111';
config.bgColor = 'black';
config.dismissOnClick = false;
const toastTemplate = document.querySelector('toast-template');
toastTemplate.showToast({
config
});
Development
Prerequisite
yarn install
Start Development Server
yarn start
Testing
yarn test
Linting
yarn lint