Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
This lib is a JavaScript tool kit of alert. It's dedicated to lightweight, profiles and highly customizable. It just give a basic style and DOM structure of a modal so that you could do what ever you want easily.
npm install gm-alert
# Or use yarn
yarn add gm-alert
or just use <script>
tag:
<link rel="stylesheet" href="path/to/gm-alert.min.css" />
<script src="path/to/gm-alert.min.js"></script>
If you use iife
or umd
with script tag, you could get global variable GmAlert
, all API is on it.
To get dist js and css files, visit releases page or use CDN of jsDelivr
.
if you use import/require
:
import { showAlert, hideAlert } from 'gm-alert'
import 'gm-alert/gm-alert.min.css'
showAlert({
// ...some options
})
hideAlert()
Don't forget to import css file.
if you use <script>
tag:
GmAlert.showAlert({
// ...some options
})
GmAlert.hideAlert()
div.gm-alert-mask > div.modal > div.title + div.body + div.footer > button[data-type="ok"] + button[data-type="cancel"]
show alert with options:
option | type | description | default value |
---|---|---|---|
title | * | title of modal, but if Boolean(title) is false , title will not display | '' |
titleClassName | string | extra class for title element | '' |
body | * | body of modal | '' |
bodyClassName | string | extra class for body element | '' |
footerClassName | string | extra class for footer element | '' |
okText | string | text of ok button | 'ok' |
onOK | function | callback when you click ok button | hidAlert |
cancelText | string | text of cancel button | 'cancel' |
onCancel | function | callback when you click cancel button | hidAlert |
maskClosAble | boolean | call onCancel when click mask of modal | true |
hide alert
MIT
1.0.1 - 2021-10-13
*Republish to npm due to some errors, so that this package could only start with version 1.0.1.
FAQs
javascript alert ui kit
The npm package gm-alert receives a total of 0 weekly downloads. As such, gm-alert popularity was classified as not popular.
We found that gm-alert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.