Sha256: bea5eb9cbcf396d54e083ba62ea241908997e03650c1f9e88404922614c42f7f

Contents?: true

Size: 368 Bytes

Versions: 44

Compression:

Stored size: 368 Bytes

Contents

module ExpressAdmin
  class LayoutComponent < ExpressTemplates::Components::Container

    has_option :style, 'Add inline styles to the element'

    before_build {
      set_attribute :style, style_attributes
    }

    def style_attributes
      attribs = config[:style] || {}
      attribs.map do |k, v|
        "#{k}: #{v}"
      end.join('; ')
    end

  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
express_admin-1.7.16 app/components/express_admin/layout_component.rb
express_admin-1.7.16.pre1 app/components/express_admin/layout_component.rb
express_admin-1.7.15 app/components/express_admin/layout_component.rb
express_admin-1.7.14 app/components/express_admin/layout_component.rb
express_admin-1.7.13 app/components/express_admin/layout_component.rb
express_admin-1.7.12 app/components/express_admin/layout_component.rb
express_admin-1.7.11 app/components/express_admin/layout_component.rb
express_admin-1.7.10 app/components/express_admin/layout_component.rb
express_admin-1.7.9 app/components/express_admin/layout_component.rb
express_admin-1.7.8 app/components/express_admin/layout_component.rb
express_admin-1.7.7 app/components/express_admin/layout_component.rb
express_admin-1.7.5 app/components/express_admin/layout_component.rb
express_admin-1.7.4 app/components/express_admin/layout_component.rb
express_admin-1.7.3 app/components/express_admin/layout_component.rb
express_admin-1.7.2 app/components/express_admin/layout_component.rb
express_admin-1.7.1 app/components/express_admin/layout_component.rb
express_admin-1.6.13 app/components/express_admin/layout_component.rb
express_admin-1.6.12 app/components/express_admin/layout_component.rb
express_admin-1.6.11 app/components/express_admin/layout_component.rb
express_admin-1.6.10 app/components/express_admin/layout_component.rb