Class: Tailwinds::Form::SubmitButtonComponent

Inherits:
TailwindComponent show all
Defined in:
app/components/tailwinds/form/submit_button_component.rb

Overview

Tailwind-styled submit button

Instance Method Summary collapse

Methods included from Tramway::Helpers::ComponentHelper

#component

Constructor Details

#initialize(action, **options) ⇒ SubmitButtonComponent

Returns a new instance of SubmitButtonComponent.



7
8
9
10
11
# File 'app/components/tailwinds/form/submit_button_component.rb', line 7

def initialize(action, **options)
  @options = options.except :type

  @text = action.is_a?(String) ? action : action.to_s.capitalize
end