Sha256: 4315bba290d63057c322f0c27433662293c427ac657f58ce88fae0f732a00687
Contents?: true
Size: 489 Bytes
Versions: 138
Compression:
Stored size: 489 Bytes
Contents
import { Controller } from 'stimulus' export default class extends Controller { static targets = ['container'] connect() { window.toastr[this.type](this.message) } get type() { const typeMap = { info: 'info', warning: 'warning', success: 'success', error: 'error', notice: 'info', alert: 'error', } return typeMap[this.containerTarget.dataset.alertType] } get message() { return this.containerTarget.innerHTML } }
Version data entries
138 entries across 138 versions & 1 rubygems