Class: RubyUI::ThemeToggle
- Defined in:
- lib/ruby_ui/theme_toggle/theme_toggle.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from RubyUI::Base
Instance Method Details
#view_template(&block) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ruby_ui/theme_toggle/theme_toggle.rb', line 5 def view_template(&block) RubyUI.Toggle( variant: :default, size: :default, aria: {label: "Toggle theme"}, wrapper: { data: { controller: "ruby-ui--theme-toggle", action: "ruby-ui--toggle:change->ruby-ui--theme-toggle#apply" } }, **attrs, &block ) end |