Class: DesignSystem::Generic::Builders::InsetText
- Defined in:
- lib/design_system/generic/builders/inset_text.rb
Overview
This generates html for rendering inset text to help users identify and understand important content on the page.
Direct Known Subclasses
DesignSystem::Govuk::Builders::InsetText, Nhsuk::Builders::InsetText
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_inset_text(text = nil, **options) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/design_system/generic/builders/inset_text.rb', line 8 def render_inset_text(text = nil, **, &) content = block_given? ? capture(&) : text return if content.blank? = (, ["#{brand}-inset-text"]) content_tag(:div, content, **) end |