Sha256: 525f5c9984cbe7a21275f021d79bb20a09fe92065377732748af5c21f387fa22
Contents?: true
Size: 536 Bytes
Versions: 2
Compression:
Stored size: 536 Bytes
Contents
module ExpressAdmin class Pane < LayoutComponent has_option :title, 'The title of the pane', default: '' has_option :status, 'Status of the pane' contains -> (&block) { heading if title || status block.call(self) if block } def heading h4(class: 'title') { current_arbre_element.add_child title if status span(class: 'status') { status } end } end def title config[:title] end def status config[:status] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
express_admin-1.4.1 | app/components/express_admin/layout_components/pane.rb |
express_admin-1.4.0 | app/components/express_admin/layout_components/pane.rb |