Module: CCS::FrontendHelpers::GovUKFrontend::Label
- Included in:
- CCS::FrontendHelpers::GovUKFrontend
- Defined in:
- lib/ccs/frontend_helpers/govuk_frontend/label.rb
Overview
GOV.UK label
This helper is used for generating the label component from the Government Design Systems
Instance Method Summary collapse
-
#govuk_label(attribute, text = nil, **options) { ... } ⇒ ActiveSupport::SafeBuffer
Generates the HTML for the GOV.UK label component.
Instance Method Details
#govuk_label(attribute, text = nil, **options) { ... } ⇒ ActiveSupport::SafeBuffer
Generates the HTML for the GOV.UK label component
23 24 25 |
# File 'lib/ccs/frontend_helpers/govuk_frontend/label.rb', line 23 def govuk_label(attribute, text = nil, **, &) Components::GovUK::Label.new(context: self, attribute: attribute, text: text, **).render(&) end |