<%= content %>
-
diff --git a/app/components/navbar/component.rb b/app/components/navbar/component.rb
index e94840d..a7fb4b3 100644
--- a/app/components/navbar/component.rb
+++ b/app/components/navbar/component.rb
@@ -1,8 +1,6 @@
# frozen_string_literal: true
class Navbar::Component < ApplicationViewComponent
- renders_many :right_sections
-
def dark_mode_switch
render(Navbar::DarkModeSwitch::Component.new)
end
@@ -14,4 +12,8 @@ def account_selector
def separator
render(Navbar::Separator::Component.new)
end
+
+ def item(**)
+ render(Navbar::Item::Component.new(**))
+ end
end
diff --git a/app/components/navbar/item/component.html.erb b/app/components/navbar/item/component.html.erb
new file mode 100644
index 0000000..aeb4052
--- /dev/null
+++ b/app/components/navbar/item/component.html.erb
@@ -0,0 +1,4 @@
+<%= link_to path, class: is_active? ? "font-bold text-primary" : "" do %>
+ <% if icon %>