Class: RubyUI::SetDarkMode
- Inherits:
-
Base
- Object
- Phlex::HTML
- Base
- RubyUI::SetDarkMode
show all
- Defined in:
- lib/ruby_ui/theme_toggle/set_dark_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_attrs ⇒ Object
9
10
11
12
13
14
|
# File 'lib/ruby_ui/theme_toggle/set_dark_mode.rb', line 9
def default_attrs
{
class: "hidden dark:inline-block",
data: {controller: "ruby-ui--theme-toggle", action: "click->ruby-ui--theme-toggle#setLightTheme"}
}
end
|
#view_template ⇒ Object
5
6
7
|
# File 'lib/ruby_ui/theme_toggle/set_dark_mode.rb', line 5
def view_template(&)
div(**attrs, &)
end
|