Sha256: ea8a833da2905bdc5607ad3c72f38da58fe156eda201f823c308359eae84ff2f

Contents?: true

Size: 343 Bytes

Versions: 75

Compression:

Stored size: 343 Bytes

Contents

import { Controller } from "@hotwired/stimulus"

// Connects to data-controller="theme-changer"
export default class extends Controller {
  connect() {
    // console.log('Theme Changer');
  }

  select(event) {
    var html = document.querySelector('html');
    html.setAttribute("data-theme", event.target.getAttribute('data-value'));
  }
}

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
rails_app_generator-0.2.30 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.29 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.28 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.27 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.26 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.25 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.24 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.23 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.22 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.21 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.20 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.19 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.18 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.17 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.16 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.15 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.14 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.13 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.12 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
rails_app_generator-0.2.11 after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js