Sha256: b9b902d579a1c771bf49c7cc100b97b0394a549d70e21093a54120a88ee3cb17
Contents?: true
Size: 836 Bytes
Versions: 15
Compression:
Stored size: 836 Bytes
Contents
module GOVUKDesignSystemFormBuilder module Containers class Radios < Base include Traits::Hint def initialize(builder, inline:, small:, classes:) @builder = builder @inline = inline @small = small @classes = classes end def html tag.div(**options) { yield } end private def options { class: classes, data: { module: %(#{brand}-radios) } } end def classes [%(#{brand}-radios), inline_class, small_class, custom_classes].flatten.compact end def inline_class %(#{brand}-radios--inline) if @inline end def small_class %(#{brand}-radios--small) if @small end def custom_classes Array.wrap(@classes) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems