Class: DesignSystem::Generic::Builders::Heading
- Defined in:
- lib/design_system/generic/builders/heading.rb
Overview
This class provides generic methods to display headings in page content.
Direct Known Subclasses
DesignSystem::Govuk::Builders::Heading, Nhsuk::Builders::Heading
Constant Summary collapse
- SIZE_MAPPING =
{ 1 => 'xl', 2 => 'l', 3 => 'm', 4 => 's', 5 => 'xs', 6 => 'xs' }.freeze
Instance Method Summary collapse
Methods inherited from Base
Methods included from Helpers::CssHelper
Methods included from Concerns::BrandDerivable
Constructor Details
This class inherits a constructor from DesignSystem::Generic::Builders::Base
Instance Method Details
#render_heading(text, level: 2, **options) ⇒ Object
17 18 19 |
# File 'lib/design_system/generic/builders/heading.rb', line 17 def render_heading(text, level: 2, **) content_tag("h#{level}", text, class: classes(level), **) end |