Skip to content

Commit

Permalink
Merge pull request #98 from PhlexUI/cirdes/migrate-theme-toggle
Browse files Browse the repository at this point in the history
Migrate theme toggle to RBUI
  • Loading branch information
cirdes authored Aug 9, 2024
2 parents 841ed7d + 38238c5 commit 3e1b81b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/PhlexUI/phlex_ui.git
revision: ade1fb28ff5695fb70e28dd1453ad2106f479eff
revision: faf332ff68cfccd40c0b55aff1697bb270db7d89
branch: v1
specs:
phlex_ui (0.1.10)
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/shared/navbar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def view_template
end

def dark_mode_toggle
ThemeToggle do |toggle|
RBUI.ThemeToggle do |toggle|
toggle.light_mode do
Button(variant: :ghost, icon: true) do
svg(
Expand Down
1 change: 1 addition & 0 deletions app/views/components/test_view.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

class TestView < Phlex::HTML
include RBUI
include PhlexUI

def view_template(&)
Expand Down
4 changes: 2 additions & 2 deletions app/views/docs/theme_toggle_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def view_template

def components
[
Docs::ComponentStruct.new(name: "ToggleThemeController", source: "https://github.com/PhlexUI/phlex_ui_stimulus/blob/main/controllers/toggle_theme_controller.js", built_using: :stimulus),
Docs::ComponentStruct.new(name: "ThemeToggle", source: "https://github.com/PhlexUI/phlex_ui/blob/main/lib/phlex_ui/theme_toggle.rb", built_using: :phlex)
Docs::ComponentStruct.new(name: "ThemeToggle", source: "https://github.com/PhlexUI/phlex_ui/blob/v1/lib/rbui/toggle_theme/theme_toggle.rb", built_using: :phlex),
Docs::ComponentStruct.new(name: "ToggleThemeController", source: "https://github.com/PhlexUI/phlex_ui/blob/v1/lib/rbui/toggle_theme/toggle_theme_controller.js", built_using: :stimulus)
]
end
end
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ queue-microtask@^1.2.2:

"rbui-js@https://github.com/PhlexUI/phlex_ui.git#v1":
version "0.0.1-alpha.0"
resolved "https://github.com/PhlexUI/phlex_ui.git#939341791f34174983adc2290c6dad6c3f20fb5b"
resolved "https://github.com/PhlexUI/phlex_ui.git#faf332ff68cfccd40c0b55aff1697bb270db7d89"
dependencies:
"@floating-ui/dom" "^1.6.8"
"@hotwired/stimulus" "^3.2.2"
Expand Down

0 comments on commit 3e1b81b

Please sign in to comment.