class Maglove::Widgets::Button
Public Instance Methods
defaults()
click to toggle source
# File lib/maglove/widgets/button.rb, line 8 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/widgets/button.rb, line 4 def identifier "button" end
template(scope) { || ... }
click to toggle source
# File lib/maglove/widgets/button.rb, line 39 def template(scope, &block) scope.haml_tag :a, button_options do if options[:media] and !options[:media].blank? scope.haml_tag :video do scope.haml_tag :source, { src: options[:media], type: "video/mp4" } end end yield if block end end