Class: RubyUI::ThemeToggle
- Inherits:
-
Base
- Object
- Phlex::HTML
- Base
- RubyUI::ThemeToggle
show all
- Defined in:
- lib/ruby_ui/theme_toggle/theme_toggle.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
#dark_mode(**user_attrs) ⇒ Object
14
15
16
17
|
# File 'lib/ruby_ui/theme_toggle/theme_toggle.rb', line 14
def dark_mode(**user_attrs, &)
dark_attrs = mix(default_dark_attrs, user_attrs)
div(**dark_attrs, &)
end
|
#light_mode(**user_attrs) ⇒ Object
9
10
11
12
|
# File 'lib/ruby_ui/theme_toggle/theme_toggle.rb', line 9
def light_mode(**user_attrs, &)
light_attrs = mix(default_light_attrs, user_attrs)
div(**light_attrs, &)
end
|
#view_template ⇒ Object
5
6
7
|
# File 'lib/ruby_ui/theme_toggle/theme_toggle.rb', line 5
def view_template(&)
div(**attrs, &)
end
|