Sha256: 14b43eb33b88c6d9d0554a8dd4cf91110eb85ff9efd81984da2df23c9b8a93c9

Contents?: true

Size: 521 Bytes

Versions: 7

Compression:

Stored size: 521 Bytes

Contents

module GOVUKDesignSystemFormBuilder
  module Containers
    class Radios < GOVUKDesignSystemFormBuilder::Base
      def initialize(builder, inline:)
        @builder = builder
        @inline = inline
      end

      def html
        @builder.content_tag('div', class: radios_classes, data: { module: 'radios' }) do
          yield
        end
      end
    private

      def radios_classes
        %w(govuk-radios).tap do |c|
          c.push('govuk-radios--inline') if @inline
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
govuk_design_system_formbuilder-0.7.6 lib/govuk_design_system_formbuilder/containers/radios.rb
govuk_design_system_formbuilder-0.7.5 lib/govuk_design_system_formbuilder/containers/radios.rb
govuk_design_system_formbuilder-0.7.4 lib/govuk_design_system_formbuilder/containers/radios.rb
govuk_design_system_formbuilder-0.7.3 lib/govuk_design_system_formbuilder/containers/radios.rb
govuk_design_system_formbuilder-0.7.2 lib/govuk_design_system_formbuilder/containers/radios.rb
govuk_design_system_formbuilder-0.7.1 lib/govuk_design_system_formbuilder/containers/radios.rb
govuk_design_system_formbuilder-0.7.0 lib/govuk_design_system_formbuilder/containers/radios.rb