Class: Polaris::SubheadingComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::SubheadingComponent
- Defined in:
- app/components/polaris/subheading_component.rb
Constant Summary collapse
- ELEMENT_DEFAULT =
:h3- ELEMENT_OPTIONS =
%i[p h1 h2 h3 h4 h5 h6]
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(element: ELEMENT_DEFAULT, **system_arguments) ⇒ SubheadingComponent
constructor
A new instance of SubheadingComponent.
Constructor Details
#initialize(element: ELEMENT_DEFAULT, **system_arguments) ⇒ SubheadingComponent
Returns a new instance of SubheadingComponent.
8 9 10 11 12 13 14 |
# File 'app/components/polaris/subheading_component.rb', line 8 def initialize( element: ELEMENT_DEFAULT, **system_arguments ) @system_arguments = system_arguments @element = element end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'app/components/polaris/subheading_component.rb', line 16 def call render(Polaris::TextComponent.new(as: @element, variant: :headingXs, **@system_arguments)) { content } end |