Class: ParagraphComponent
- Defined in:
- app/components/paragraph_component.rb
Overview
Paragraph — a plain <p> element.
Usage:
Paragraph { text "Some text content" }
Paragraph(id: "intro") { text "Introduction" }
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
10 11 12 |
# File 'app/components/paragraph_component.rb', line 10 def to_s tag.p(**) { @content } end |