diff --git a/app/components/navbar/component.rb b/app/components/navbar/component.rb index 4fca3d6..ea602b4 100644 --- a/app/components/navbar/component.rb +++ b/app/components/navbar/component.rb @@ -2,4 +2,12 @@ class Navbar::Component < ApplicationViewComponent renders_many :right_sections + + def dark_mode_switch + render(Navbar::DarkModeSwitch::Component.new) + end + + def account_selector(current_user:, current_account:) + render(Navbar::AccountSelector::Component.new(current_user:, current_account:)) + end end diff --git a/app/components/navbar/dark_mode_switch/component.html.erb b/app/components/navbar/dark_mode_switch/component.html.erb new file mode 100644 index 0000000..36b81c1 --- /dev/null +++ b/app/components/navbar/dark_mode_switch/component.html.erb @@ -0,0 +1,4 @@ + diff --git a/app/components/navbar/dark_mode_switch/component.rb b/app/components/navbar/dark_mode_switch/component.rb new file mode 100644 index 0000000..359149d --- /dev/null +++ b/app/components/navbar/dark_mode_switch/component.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class Navbar::DarkModeSwitch::Component < ApplicationViewComponent + # with_collection_parameter :dark_mode_switch +end diff --git a/app/components/navbar/dark_mode_switch/preview.rb b/app/components/navbar/dark_mode_switch/preview.rb new file mode 100644 index 0000000..aa53628 --- /dev/null +++ b/app/components/navbar/dark_mode_switch/preview.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class Navbar::DarkModeSwitch::Preview < ApplicationViewComponentPreview + # You can specify the container class for the default template + # self.container_class = "w-1/2 border border-gray-300" + + def default + end +end diff --git a/app/components/navbar/dropdown/component.html.erb b/app/components/navbar/dropdown/component.html.erb index d4de9e9..3d3025d 100644 --- a/app/components/navbar/dropdown/component.html.erb +++ b/app/components/navbar/dropdown/component.html.erb @@ -1,6 +1,7 @@