Skip to content

Latest commit

 

History

History
61 lines (46 loc) · 1.2 KB

README.md

File metadata and controls

61 lines (46 loc) · 1.2 KB

Build Status codecov

Toast Manager Component

A Toast manager built on LitElement with support for custom content and light DOM elements.

Toast Manager

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