Sha256: d2244ce228e9e409441f73d19b42803ab6351d677626463e9f566910ccaba38b

Contents?: true

Size: 769 Bytes

Versions: 3

Compression:

Stored size: 769 Bytes

Contents

module ExpressAdmin
  class PageHeaderComponent < ExpressTemplates::Components::Base
    ETC = ExpressTemplates::Components

    class PageHeader < ExpressTemplates::Components::Base
      include ETC::Capabilities::Conditionality

      emits -> {
              h1 {
                content_for(:page_header)
              }
            }

      only_if -> { content_for?(:page_header) }

    end

    class PageHeaderLead < ExpressTemplates::Components::Base
      include ETC::Capabilities::Conditionality

      emits -> {
              p.lead {
                content_for(:page_header_lead)
              }
            }

      only_if -> { content_for?(:page_header_lead) }

    end

    emits -> {
        page_header
        page_header_lead
    }

  end


end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
express_admin-1.2.1 app/components/express_admin/page_header_component.rb
express_admin-1.2.0 app/components/express_admin/page_header_component.rb
express_admin-1.1.0 app/components/express_admin/page_header_component.rb