lib/voom/presenters/dsl/components/button.rb in voom-presenters-0.1.8 vs lib/voom/presenters/dsl/components/button.rb in voom-presenters-0.1.9
- old
+ new
@@ -31,9 +31,14 @@
context: context,
**attribs, &block)
end
+ def image(image=nil, **attribs, &block)
+ return @image if locked?
+ @image = Components::Image.new(parent: self, image: image, context: context, **attribs, &block)
+ end
+
def menu(**attributes, &block)
return @menu if locked?
@menu = Components::Menu.new(parent: self, position: menu_position, context: context, **attributes, &block)
end