Sha256: c4ba15338f755b1c9e563c7a8bd7fbdba19660edb65c44aef319b02cd77d0d8b
Contents?: true
Size: 434 Bytes
Versions: 2
Compression:
Stored size: 434 Bytes
Contents
import { Controller } from '@hotwired/stimulus' export default class extends Controller { static targets = ['closeButton'] static classes = ['closing'] static values = { transition: Number } connect () { // Give focus to the close button this.closeButtonTarget.focus(); } close () { this.element.classList.add(...this.closingClasses); setTimeout(() => this.element.remove(), this.transitionValue) } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
solidus_admin-0.0.2 | app/components/solidus_admin/ui/toast/component.js |
solidus_admin-0.0.1 | app/components/solidus_admin/ui/toast/component.js |