Sha256: bdaba1b02d3f0cbf9aa5025de09b32a31515f2d08afdedfdd7d5486569543e20

Contents?: true

Size: 592 Bytes

Versions: 18

Compression:

Stored size: 592 Bytes

Contents

module Maglove
  module Widgets
    class HorizontalRule < Base
      def identifier
        "horizontal_rule"
      end

      def defaults
        {
          style: 'solid',
          color: 'dark',
          max_height: 'inherit'
        }
      end

      module Helpers
        def horizontal_rule_widget(options = {})
          widget_block(Widgets::HorizontalRule.new(options)) do |widget|
            haml_tag :hr, style: "max-height: #{widget.options[:max_height]}", class: "#{widget.options[:style]} #{widget.options[:color]}"
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
maglove-widgets-1.1.9 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.1.8 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.1.7 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.1.6 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.1.5 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.1.4 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.1.3 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-2.0.1 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.0.8 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.0.7 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.0.6 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-2.0.0 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.0.5 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.0.4 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.0.3 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.0.2 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.0.1 lib/maglove/widgets/horizontal_rule.rb
maglove-widgets-1.0.0 lib/maglove/widgets/horizontal_rule.rb