Class: InnerPlan::Tasks::Show::RowComponent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- InnerPlan::Tasks::Show::RowComponent
- Defined in:
- app/components/inner_plan/tasks/show/row_component.rb
Instance Method Summary collapse
-
#initialize ⇒ RowComponent
constructor
A new instance of RowComponent.
- #template(&content) ⇒ Object
- #with_column(span: 6, &content) ⇒ Object
Constructor Details
#initialize ⇒ RowComponent
Returns a new instance of RowComponent.
3 4 5 |
# File 'app/components/inner_plan/tasks/show/row_component.rb', line 3 def initialize @columns = [] end |
Instance Method Details
#template(&content) ⇒ Object
7 8 9 10 11 |
# File 'app/components/inner_plan/tasks/show/row_component.rb', line 7 def template(&content) div(class: "row") { render content } end |
#with_column(span: 6, &content) ⇒ Object
13 14 15 16 17 |
# File 'app/components/inner_plan/tasks/show/row_component.rb', line 13 def with_column(span: 6, &content) div(class: "col-#{span}") { render content } end |