Class: ContainerComponent
- Defined in:
- app/components/container_component.rb
Overview
Container — fixed-width page container.
Usage:
Container { text "Page content" }
Container(text: true) { text "Narrower text container" }
Container(fluid: true) { text "Full-width" }
Constant Summary
Constants inherited from Component
Instance Method Summary collapse
Methods inherited from Component
default, #initialize, #render_in, slot
Constructor Details
This class inherits a constructor from Component
Instance Method Details
#to_s ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/components/container_component.rb', line 14 def to_s classes = class_names( "ui", { "text" => text, "fluid" => fluid }, "container" ) tag.div(**(class: classes)) { @content } end |