Sha256: 4b895c105fab1f4de8ad90399461b2020cc0b705c8eadf673395f9abf0a768a8
Contents?: true
Size: 1.21 KB
Versions: 20
Compression:
Stored size: 1.21 KB
Contents
require_relative '../../../base' module CCS module Components module GovUK class SummaryList < Base class Row < Base # = GOV.UK Summary list row value # # @!attribute [r] text # @return [String] Text for the summary list row value class Value < Base private attr_reader :text public # @param text [String] Text for the summary list row value # @param options [Hash] options that will be used in customising the HTML # # @option options [String] :classes additional CSS classes for the summary list row value HTML def initialize(text:, **options) super(**options) @text = text end # Generates the HTML for the GOV.UK Summary list row value # # @return [ActiveSupport::SafeBuffer] def render tag.dd(text, class: @options[:attributes][:class]) end # The default attributes for the summary list row value DEFAULT_ATTRIBUTES = { class: 'govuk-summary-list__value' }.freeze end end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems