Sha256: 12f7fce38189810436ec8bc2c4feca47763a3581c7d9fa97b57c540e8b0f5db9

Contents?: true

Size: 605 Bytes

Versions: 4

Compression:

Stored size: 605 Bytes

Contents

module Maglove
  module Widgets
    class RawHtml < Base
      def identifier
        "raw_html"
      end

      def defaults
        {
            src: "",
            css: ""
        }
      end

      module Helpers
        def raw_html_widget(options = {}, &block)
          widget_block(Widgets::RawHtml.new(options)) do |widget|
            haml_tag :div, class: "iframe-container", style: style_string(widget.options, :margin, :padding) do
              haml_tag :iframe, src: widget.options[:src], style: widget.options[:css]
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
maglove-widgets-1.1.9 lib/maglove/widgets/raw_html.rb
maglove-widgets-1.1.8 lib/maglove/widgets/raw_html.rb
maglove-widgets-1.1.7 lib/maglove/widgets/raw_html.rb
maglove-widgets-1.1.6 lib/maglove/widgets/raw_html.rb