class Maglove::Widget::LegacyButton
Public Instance Methods
defaults()
click to toggle source
# File lib/maglove/widget/button.rb, line 27 def defaults { background_color: "#e6e6e6", border_radius: "4px", border_width: "1px", border_style: "solid", media: false, size: "btn-lg", style: "primary", type: "btn-fit" } end
identifier()
click to toggle source
# File lib/maglove/widget/button.rb, line 23 def identifier "button" end
render() { |self| ... }
click to toggle source
Calls superclass method
Maglove::Widget::V1#render
# File lib/maglove/widget/button.rb, line 51 def render(&block) super do haml_tag :a, button_attributes do if options[:media] and !options[:media].blank? haml_tag :video do haml_tag :source, { src: options[:media], type: "video/mp4" } end end yield self if block_given? end end end