0.3.0 • Published 4 years ago

@simplr-wc/snackbar v0.3.0

Weekly downloads
22
License
MIT
Repository
github
Last release
4 years ago

Simplr Snackbar

Usage

Import
import openSnackBar from '@simplr-wc/snackbar';
Use
openSnackBar();

openSnackBar({
  status: "success",
  message: "Successfully saved progress",
  timeout: 6000,
  action: () => console.log("closed by user action"),
  position: "topright"
});

Properties

PropertyAttributeTypeDefaultDescription
actionaction"action"Function initiated if the user clicks on the snackbar
messagemessagestring"message"Message displayed with the snackbar
positionposition"topleft"\|"top"\|"topright"\|"right"\|"bottomright"\|"bottom"\|"bottomleft"\|"left""position"Position of the snackbar. Defaults to bottom
statusstatus"success"\|"error"\|"caution"\|"info""status"Status / Theme of the snackbar. Defaults to Info
timeouttimeoutnumber"timeout"Timeout in milliseconds until the snackbar fades away. Defaults to 4000

Methods

MethodType
openSnackbar(): Promise<void>
0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.3

4 years ago