Sha256: 06497d3317c2ee8f2710cc6fdf4d9644b27d4b67e95b23887df6bce479eb0353

Contents?: true

Size: 699 Bytes

Versions: 21

Compression:

Stored size: 699 Bytes

Contents

module GOVUKDesignSystemFormBuilder
  module Containers
    class CheckBoxes < Base
      include Traits::HTMLClasses
      include Traits::HTMLAttributes

      def initialize(builder, small:, **kwargs)
        super(builder, nil, nil)

        @small = small
        @html_attributes = kwargs
      end

      def html(&block)
        tag.div(**attributes(@html_attributes), &block)
      end

    private

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

      def classes
        build_classes(
          %(#{brand}-checkboxes),
          %(#{brand}-checkboxes--small) => @small,
        )
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
govuk_design_system_formbuilder-5.8.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.7.1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.7.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.6.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.5.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.4.1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/govuk_design_system_formbuilder-5.4.0/lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.3.3 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.3.2 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.3.1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.3.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.2.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.1.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.1.0b1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.0.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-5.0.0b1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-4.1.1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-4.1.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-4.0.0 lib/govuk_design_system_formbuilder/containers/check_boxes.rb
govuk_design_system_formbuilder-4.0.0rc1 lib/govuk_design_system_formbuilder/containers/check_boxes.rb