File tree Expand file tree Collapse file tree
docs/app/javascript/controllers/ruby_ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { Controller } from "@hotwired/stimulus"
22
33// Connects to data-controller="ruby-ui--theme-toggle"
44// Expects to sit on the same element as ruby-ui--toggle and listen to its
5- // ruby-ui: toggle:change event. pressed = dark mode.
5+ // ruby-ui-- toggle:change event. pressed = dark mode.
66export default class extends Controller {
77 connect ( ) {
88 this . applyTheme ( this . currentTheme ( ) )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ def view_template(&block)
99 aria : { label : "Toggle theme" } ,
1010 data : {
1111 controller : "ruby-ui--toggle ruby-ui--theme-toggle" ,
12- action : "ruby-ui: toggle:change->ruby-ui--theme-toggle#apply"
12+ action : "ruby-ui-- toggle:change->ruby-ui--theme-toggle#apply"
1313 } ,
1414 **attrs ,
1515 &block
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { Controller } from "@hotwired/stimulus"
22
33// Connects to data-controller="ruby-ui--theme-toggle"
44// Expects to sit on the same element as ruby-ui--toggle and listen to its
5- // ruby-ui: toggle:change event. pressed = dark mode.
5+ // ruby-ui-- toggle:change event. pressed = dark mode.
66export default class extends Controller {
77 connect ( ) {
88 this . applyTheme ( this . currentTheme ( ) )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def test_wires_theme_toggle_controller
1313 output = phlex { RubyUI . ThemeToggle { "icon" } }
1414 assert_match ( /data-controller="[^"]*ruby-ui--theme-toggle/ , output )
1515 assert_match ( /data-controller="[^"]*ruby-ui--toggle/ , output )
16- assert_match ( /ruby-ui: toggle:change->ruby-ui--theme-toggle#apply/ , output )
16+ assert_match ( /ruby-ui-- toggle:change->ruby-ui--theme-toggle#apply/ , output )
1717 end
1818
1919 def test_block_content_rendered
You can’t perform that action at this time.
0 commit comments