Class: GOVUKDesignSystemFormBuilder::Containers::ButtonGroup

Inherits:
Base
  • Object
show all
Defined in:
lib/govuk_design_system_formbuilder/containers/button_group.rb

Instance Method Summary collapse

Methods inherited from Base

#field_id, #to_s

Constructor Details

#initialize(builder, buttons) ⇒ ButtonGroup

Returns a new instance of ButtonGroup.



4
5
6
7
8
# File 'lib/govuk_design_system_formbuilder/containers/button_group.rb', line 4

def initialize(builder, buttons)
  super(builder, nil, nil)

  @buttons = buttons
end

Instance Method Details

#htmlObject



10
11
12
# File 'lib/govuk_design_system_formbuilder/containers/button_group.rb', line 10

def html
  tag.div(@buttons, class: %(#{brand}-button-group))
end