Sha256: eadbc83da75d7026e4e8bc6fcccfe9a20af91800596edd735c6adcfbf8193a9b
Contents?: true
Size: 757 Bytes
Versions: 4
Compression:
Stored size: 757 Bytes
Contents
import ApplicationController from './application_controller' export default class extends ApplicationController { show () { this.wrapperController.animate() document.body.classList.add('mobile-nav-expanded') } hide () { this.wrapperController.animate() document.body.classList.remove('mobile-nav-expanded') } toggle () { this.wrapperController.animate() document.body.classList.toggle('mobile-nav-expanded') } get isExpanded () { return document.body.classList.contains('mobile-nav-expanded') } get wrapperElement () { return document.getElementById('app-wrapper') } get wrapperController () { return this.application.getControllerForElementAndIdentifier(this.wrapperElement, 'wrapper') } }
Version data entries
4 entries across 4 versions & 1 rubygems