Class: Primer::SubheadComponent::Heading
- Inherits:
-
ViewComponent::Slot
- Object
- ViewComponent::Slot
- Primer::SubheadComponent::Heading
- Includes:
- ClassNameHelper
- Defined in:
- app/components/primer/subhead_component.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#system_arguments ⇒ Object
readonly
Returns the value of attribute system_arguments.
Instance Method Summary collapse
-
#initialize(danger: false, **system_arguments) ⇒ Heading
constructor
A new instance of Heading.
Methods included from ClassNameHelper
Constructor Details
#initialize(danger: false, **system_arguments) ⇒ Heading
Returns a new instance of Heading.
78 79 80 81 82 83 84 85 86 |
# File 'app/components/primer/subhead_component.rb', line 78 def initialize(danger: false, **system_arguments) @system_arguments = system_arguments @system_arguments[:tag] ||= :div @system_arguments[:classes] = class_names( @system_arguments[:classes], "Subhead-heading", "Subhead-heading--danger": danger ) end |
Instance Attribute Details
#system_arguments ⇒ Object (readonly)
Returns the value of attribute system_arguments.
74 75 76 |
# File 'app/components/primer/subhead_component.rb', line 74 def system_arguments @system_arguments end |