Sha256: d95f1faa7f8085018429650f8a0b09882bbc2f71799b06c6ff62a896a43193bc

Contents?: true

Size: 713 Bytes

Versions: 18

Compression:

Stored size: 713 Bytes

Contents

module GOVUKDesignSystemFormBuilder
  module Containers
    class CheckBoxes < Base
      def initialize(builder, small:, classes: nil)
        super(builder, nil, nil)

        @small   = small
        @classes = classes
      end

      def html(&block)
        tag.div(**options, &block)
      end

    private

      def options
        {
          class: classes,
          data: { module: %(#{brand}-checkboxes) }
        }
      end

      def classes
        combine_references(%(#{brand}-checkboxes), small_class, custom_classes)
      end

      def small_class
        %(#{brand}-checkboxes--small) if @small
      end

      def custom_classes
        Array.wrap(@classes)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
govuk_design_system_formbuilder-3.3.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.2.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.1.2 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.1.1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.1.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.0.3 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.0.3b1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.0.2 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.0.1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.0.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.0.0b2 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-3.0.0b1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-2.8.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-2.7.6 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-2.7.5 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-2.7.4 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-2.7.3 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-2.7.2 lib/govuk_design_system_formbuilder/containers/check_boxes.rb