lib/voom/presenters/dsl/components/lists/action.rb in voom-presenters-0.1.13 vs lib/voom/presenters/dsl/components/lists/action.rb in voom-presenters-0.2.0

- old
+ new

@@ -1,7 +1,7 @@ -require_relative '../icon' -require_relative '../icon_toggle' +require 'voom/presenters/dsl/components/icon' +require 'voom/presenters/dsl/components/icon_toggle' module Voom module Presenters module DSL @@ -17,52 +17,51 @@ def icon(icon=nil, **attribs, &block) return @icon if locked? @action_type = :icon @icon = Icon.new(parent: self, icon: icon, - context: context, **attribs, &block) end def menu(**attribs, &block) return @menu if locked? @action_type = :menu - @menu = Menu.new(parent: self, context: context, + @menu = Menu.new(parent: self, **attribs, &block) end def checkbox(**attribs, &block) return @checkbox if locked? @action_type = :checkbox - @checkbox = Checkbox.new(parent: self, context: context, + @checkbox = Checkbox.new(parent: self, **attribs, &block) end def radio_button(**attribs, &block) return @radio_button if locked? @action_type = :radio_button - @radio_button = RadioButton.new(parent: self, context: context, + @radio_button = RadioButton.new(parent: self, **attribs, &block) end def switch(**attribs, &block) return @switch if locked? @action_type = :switch - @switch = Switch.new(parent: self, context: context, + @switch = Switch.new(parent: self, **attribs, &block) end def icon_toggle(icon=nil, **attribs, &block) return @icon_toggle if locked? @action_type = :icon_toggle - @icon_toggle = IconToggle.new(parent: self, icon: icon, context: context, **attribs, &block) + @icon_toggle = IconToggle.new(parent: self, icon: icon, **attribs, &block) end def button(text=nil, **attribs, &block) return @button if locked? @action_type = :button - @button = Components::Button.new(text: text, parent: self, context: context, **attribs, &block) + @button = Components::Button.new(text: text, parent: self, **attribs, &block) end end end end end