Skip to content

Commit

Permalink
chore: drop dry-initializer dependency (#3153)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob committed Aug 19, 2024
1 parent ff35408 commit d75efb9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/components/avo/profile_item_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Avo::ProfileItemComponent < Avo::BaseComponent
end
prop :title, _Nilable(String), reader: :public
prop :method, _Nilable(String), reader: :public
prop :params, Hash, default: {}.freeze, reader: :public
prop :params, _Nilable(Hash), default: {}.freeze, reader: :public
prop :classes, String, default: "", reader: :public

def title
Expand Down
3 changes: 2 additions & 1 deletion app/components/avo/sidebar/base_item_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
class Avo::Sidebar::BaseItemComponent < Avo::BaseComponent
delegate :collapsable, :collapsed, to: :@item

prop :item, _Nilable(ViewComponent::Base)
# Object = Avo::Menu::BaseItem || ViewComponent::Base
prop :item, _Nilable(Object), reader: :public

def after_initialize
@items = @item.items.select(&:visible?)
Expand Down
2 changes: 1 addition & 1 deletion app/components/avo/sidebar/group_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
menu_target: :items,
**section_collapse_data_animation
} do %>
<% items.each do |item| %>
<% @items.each do |item| %>
<%= render Avo::Sidebar::ItemSwitcherComponent.new item: item %>
<% end %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/components/avo/sidebar/heading_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ class Avo::Sidebar::HeadingComponent < Avo::BaseComponent
prop :icon, _Nilable(String)
prop :collapsable, _Boolean, default: false
prop :collapsed, _Boolean, default: false
prop :key, _Nilable(_Boolean), default: false
prop :key, _Nilable(String)
end
2 changes: 1 addition & 1 deletion app/components/avo/sidebar/section_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
menu_target: :items,
**section_collapse_data_animation
} do %>
<% items.each do |item| %>
<% @items.each do |item| %>
<%= render Avo::Sidebar::ItemSwitcherComponent.new item: item %>
<% end %>
<% end %>
Expand Down

0 comments on commit d75efb9

Please sign in to comment.