2.1.3 • Published 2 years ago

frontle-toast v2.1.3

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

Frontle Toast

Toast UI in Frontle

화면-기록-2022-07-12-오후-4.50.51

Usage

// at css file
.toastBackground{
    background-color: grey;
}
.toastColor{
    color: white;
}

// at js file
import frontle_toast from "browser_modules/frontle-toast/module.js";
const Toast = frontle_toast.Toast;

let toast = new Toast('<div>this is a toast<div>');
toast.toastClass = 'toastBackground toastColor';
toast.start = () => {
    console.log('toast start!');
}
toast.open();

Install

Frontle

frontle install frontle-toast

Download files

https://github.com/Artifriends-inc/Frontle-Toast

API

new toast(html)

Create a toast object

let toast = new Toast('<div>this is a toast<div>');

.toastClass

Set the css class of a toast

toast.toastClass = 'toastBackground toastColor';

.transitionSeconds

Set the toast animation time

toast.transitionSeconds = 0.3;

.holdSeconds

Set the toast hold time

toast.holdSeconds = 3;

.awake

This lifecycle runs before toast rendering.

toast.awake = () => { console.log('before rendering') }

.start

This lifecycle runs after toast rendered

toast.start = () => { console.log('after rendering') }

.end

This lifecycle runs before toast termination

toast.end = () => { console.log('before termination') }

.sleep

This lifecycle runs after toast termination

toast.sleep = () => { console.log('after termination') }

.open()

Open toast

toast.open();

.close()

Close toast

toast.close();

People

The original author of frontle-toast is MushStory

License

MIT

2.1.2

2 years ago

2.1.3

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago