Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gm-alert

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gm-alert

javascript alert ui kit

  • 0.1.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

gm-alert

javascript alert ui kit

Usage

import dependencies

<link rel="stylesheet" href="path/to/gm-alert.min.css" />
<script src="path/to/gm-alert.min.js"></script>

Notice that you should import js after window is onload otherwise you will get an error.

API

window.showAlert(config)

show alert with options:

optiontypedescriptiondefault value
title*title of modal, but is Boolean(title) is false, title will not display''
titleClassNamestringextra class name for title element''
body*body of modal''
bodyClassNamestringextra class name for body element''
footerClassNamestringextra class name for footer element''
okTextstringtext of ok button'ok'
onOKfunctioncallback when you click ok button() => void 0
cancelTextstringtext of cancel button'cancel'
onCancelfunctioncallback when you click cancel buttonwindow.hideAlert
maskClosAblebooleancall onCancel when click mask of modaltrue

window.hideAlert()

hide alert

license

MIT

Keywords

FAQs

Package last updated on 14 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc