Method: Primer::Forms::Button#initialize
- Defined in:
- app/lib/primer/forms/button.rb
#initialize(input:, type: :button) ⇒ Button
Returns a new instance of Button.
33 34 35 36 37 38 39 40 41 42 |
# File 'app/lib/primer/forms/button.rb', line 33 def initialize(input:, type: :button) @input = input @type = type @input.add_input_classes("FormField-input flex-self-start") @input.merge_input_arguments!(tag_attributes.deep_symbolize_keys) # rails uses a string for this, but PVC wants a symbol @input.merge_input_arguments!(type: type.to_sym) end |