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-2.0.0.b app/components/express_admin/layout_component.rb
express_admin-2.0.0.a app/components/express_admin/layout_component.rb
express_admin-1.8.1 app/components/express_admin/layout_component.rb
express_admin-1.8.0 app/components/express_admin/layout_component.rb
express_admin-1.7.32 app/components/express_admin/layout_component.rb
express_admin-1.7.31 app/components/express_admin/layout_component.rb
express_admin-1.7.30 app/components/express_admin/layout_component.rb
express_admin-1.7.29 app/components/express_admin/layout_component.rb
express_admin-1.7.28 app/components/express_admin/layout_component.rb
express_admin-1.7.27 app/components/express_admin/layout_component.rb
express_admin-1.7.26 app/components/express_admin/layout_component.rb
express_admin-1.7.25 app/components/express_admin/layout_component.rb
express_admin-1.7.24 app/components/express_admin/layout_component.rb
express_admin-1.7.23 app/components/express_admin/layout_component.rb
express_admin-1.7.22 app/components/express_admin/layout_component.rb
express_admin-1.7.21 app/components/express_admin/layout_component.rb
express_admin-1.7.20 app/components/express_admin/layout_component.rb
express_admin-1.7.19 app/components/express_admin/layout_component.rb
express_admin-1.7.18 app/components/express_admin/layout_component.rb
express_admin-1.7.17 app/components/express_admin/layout_component.rb