Class: ParagraphComponent

Inherits:
Component show all
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

Component::HTML_OPTIONS

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_sObject



10
11
12
# File 'app/components/paragraph_component.rb', line 10

def to_s
  tag.p(**merge_html_options) { @content }
end