How to use the @pluginjs/pop-dialog function in @pluginjs/pop-dialog

To help you get started, we’ve selected a few @pluginjs/pop-dialog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pluginjs / pluginjs / modules / bg-picker / src / main.js View on Github external
this.$infoImageName = hideElement(
      query(`.${this.classes.IMAGENAMEINFO}`, this.$info)
    )
    this.$infoImage = query(`.${this.classes.INFOIMAGE}`, this.$info)
    this.$remove = query(`.${this.classes.REMOVE}`, this.$info)
    this.$edit = query(`.${this.classes.EDIT}`, this.$info)

    this.$expandPanel = query(`.${this.classes.EXPANDPANEL}`, this.$wrap)
    this.$control = query(`.${this.classes.CONTROL}`, this.$expandPanel)
    this.$cancel = query(`.${this.classes.CANCEL}`, this.$control)
    this.$save = query(`.${this.classes.SAVE}`, this.$control)
    this.$imageWrap = query(`.${this.classes.IMAGEWRAP}`, this.$expandPanel)
    this.$image = query(`.${this.classes.IMAGE}`, this.$expandPanel)

    // init pop
    this.pop = new PopDialog(this.$remove, {
      placement: 'bottom',
      content: 'Are you sure you want to delete?',
      buttons: {
        cancel: { label: 'Cancel' },
        delete: {
          label: 'Delete',
          color: 'danger',
          fn: resolve => {
            // this.$remove.closest(`.${this.classes.INFO}`).fadeOut(100, () => {
            //   this.clear()
            //   this.$remove.fadeIn()
            // })

            resolve()
          }
        }
github pluginjs / pluginjs / modules / bg-picker / src / trigger.js View on Github external
bulidPop() {
    const that = this
    // init pop
    this.CLEARPOP = new PopDialog(this.$remove, {
      placement: 'bottom',
      content: 'Are you sure you want to delete?',
      buttons: [
        {
          action: 'cancel',
          label: 'Cancel'
        },
        {
          action: 'delete',
          label: 'Delete',
          color: 'danger',
          fn: resolve => {
            that.instance.clear()
            resolve()
          }
        }

@pluginjs/pop-dialog

A flexible modern pop-dialog js plugin.

GPL-3.0
Latest version published 2 years ago

Package Health Score

46 / 100
Full package analysis

Popular @pluginjs/pop-dialog functions

Similar packages