1.0.3 • Published 1 year ago

duct-alert v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

using duct-alert

With alert-duct, you can show notifications to users in an animated manner.

Demo

https://codeduct.com/duct-alert

duct-alert setup

npm

npm i duct-alert

Add the duct-alert package in the component you want to use after installation.

import alertDuct from 'duct-alert'

ready to use

alertDuct({
    animateInClass : 'animate__backInDown',
    animateOutClass : 'animate__backOutDown',
    type: 'info',
    head : 'Completed Successfully',
    message : 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Enim doloremque repellat, vitae at fugit numquam fugiat veniam a minus! Provident fugiat, optio dignissimos officia voluptatem ea. Unde nemo in eum!',
    button : {
        closeText : 'Close'
    },
    clickOutSide : false
})

You can send your notifications within the alertDuct function.

Parameters

NameValueDefault Value
typeSpecifies the type of notifications. danger, warning, success, infoinfo
animateInClassThe opening animation of the popup. For different animation types, you can check out Animate.css.animate__bounceIn
animateOutClassClosing animation of the popup window. You can check out Animate.css for different types of animations.animate__bounceOut
headRepresents the title in the alert boxempty
messageRepresents the Descriptive text in the alert boxrequired
closeTexttext on close buttonClose
clickOutSideAllows the popup window to be closed if clicked outside the popup windowtrue