index.coffee 364 B

123456789101112131415
  1. # app/components/UI/ThemeToggle/index.coffee
  2. module.exports =
  3. name: 'theme-toggle'
  4. props:
  5. theme:
  6. type: String
  7. default: 'light'
  8. methods:
  9. toggle: ->
  10. @$emit 'theme-changed', if @theme == 'light' then 'dark' else 'light'
  11. render: (new Function '_ctx', '_cache', globalThis.renderFns['app/components/UI/ThemeToggle/index.pug'])()