Have ideas to improve npm?Join in the discussion! »

    @omiu/dialog-extention
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.4 • Public • Published

    DialogExtention

    Pop alert, confirm or prompt in the middle of the page

    Import

    import '@omiu/dialog-extention'

    Or use script tag to ref it.

    <script src="https://unpkg.com/@omiu/dialog-extention"></script>

    Usage

    Omiu.alert({
      msg: 'Simple Message',
      title: 'Msg',
      confirmButtonText: 'OK',
      onConfirm: function () {
        console.log('ok')
      }
    })
     
    Omiu.confirm({
      msg: 'Simple Message',
      title: 'Msg',
      cancelButtonText: 'Cancel',
      confirmButtonText: 'OK',
      onCancel: function () {
     
      },
      onConfirm: function () {
        console.log('ok')
      }
    })
     
    Omiu.prompt({
      msg: 'Simple Message',
      title: 'Msg',
      cancelButtonText: 'Cancel',
      confirmButtonText: 'OK',
      onCancel: function () {
     
      },
      onConfirm: function (val) {
        console.log(val)
      }
    })

    Install

    npm i @omiu/dialog-extention

    DownloadsWeekly Downloads

    5

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    246 kB

    Total Files

    12

    Homepage

    omijs.org

    Last publish

    Collaborators

    • avatar