%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/pjc/vendor/needim/noty/src/
Upload File :
Create Path :
Current File : /var/www/pjc/vendor/needim/noty/src/button.js

import * as Utils from 'utils'

export class NotyButton {
  constructor (html, classes, cb, attributes = {}) {
    this.dom = document.createElement('button')
    this.dom.innerHTML = html
    this.id = (attributes.id = attributes.id || Utils.generateID('button'))
    this.cb = cb
    Object.keys(attributes).forEach(propertyName => {
      this.dom.setAttribute(propertyName, attributes[propertyName])
    })
    Utils.addClass(this.dom, classes || 'noty_btn')

    return this
  }
}

Zerion Mini Shell 1.0