Sha256: 39aba6e062df4ae257617b6ad7f0c7af7e79ba8029bd61ada2883fb9f69cea27
Contents?: true
Size: 976 Bytes
Versions: 2
Compression:
Stored size: 976 Bytes
Contents
import { Controller } from '@hotwired/stimulus'; export default class SlideoverComponent extends Controller { toggle() { var _a; this.expandableTarget.classList.toggle('hidden'); this.expandWrapperTarget.classList.toggle('bg-filter-panel'); for (const slidePanel of this.slidePanelTargets) { slidePanel.classList.toggle('hidden'); } this.buttonWrapperTarget.classList.toggle('bg-filter-panel'); if ((_a = document.getElementById('btnClose')) === null || _a === void 0 ? void 0 : _a.classList.contains('hidden')) { const formID = this.buttonWrapperTarget.getAttribute('data-slideover-component-form-id'); if (formID) { const form = document.getElementById(formID); form === null || form === void 0 ? void 0 : form.submit(); } } } } SlideoverComponent.targets = ['expandable', 'expandWrapper', 'slidePanel', 'buttonWrapper'];
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ariadne_view_components-0.0.6 | app/components/ariadne/slideover-component.js |
ariadne_view_components-0.0.5 | app/components/ariadne/slideover-component.js |