Class: RubyUI::SetLightMode

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_ui/theme_toggle/set_light_mode.rb

Constant Summary

Constants inherited from Base

Base::TAILWIND_MERGER

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from RubyUI::Base

Instance Method Details

#default_attrsObject



9
10
11
12
13
14
# File 'lib/ruby_ui/theme_toggle/set_light_mode.rb', line 9

def default_attrs
  {
    class: "dark:hidden",
    data: {controller: "ruby-ui--theme-toggle", action: "click->ruby-ui--theme-toggle#setDarkTheme"}
  }
end

#view_templateObject



5
6
7
# File 'lib/ruby_ui/theme_toggle/set_light_mode.rb', line 5

def view_template(&)
  div(**attrs, &)
end