Sha256: d42168edcd99b022b22c896407716c37d63a47adf02e33f539e98e54e98587fd

Contents?: true

Size: 291 Bytes

Versions: 7

Compression:

Stored size: 291 Bytes

Contents

import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  static values = {
    cookie: String
  }

  setCookie(event) {
    let value = !event.currentTarget.checked

    document.cookie = `${this.cookieValue}=${value}; Path=/`
    location.reload()
  }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/components/solidus_admin/layout/navigation/component.js
solidus_admin-0.3.1 app/components/solidus_admin/layout/navigation/component.js
solidus_admin-0.3.0 app/components/solidus_admin/layout/navigation/component.js
solidus_admin-0.2.0 app/components/solidus_admin/layout/navigation/component.js
solidus_admin-0.1.0 app/components/solidus_admin/layout/navigation/component.js
solidus_admin-0.0.2 app/components/solidus_admin/sidebar/component.js
solidus_admin-0.0.1 app/components/solidus_admin/sidebar/component.js