Method: CCS::Components::GovUK::InsetText#render

Defined in:
lib/ccs/components/govuk/inset_text.rb

#render { ... } ⇒ ActiveSupport::SafeBuffer

Generates the HTML for the GOV.UK Inset text component

Yields:

  • HTML that will be contained within the inset text div. Ignored if inset text is given

Returns:

  • (ActiveSupport::SafeBuffer)


40
41
42
43
44
# File 'lib/ccs/components/govuk/inset_text.rb', line 40

def render
  tag.div(**options[:attributes]) do
    text || yield
  end
end