Class: Tailwinds::Form::SubmitButtonComponent
- Inherits:
-
TailwindComponent
- Object
- ViewComponent::Base
- Tramway::BaseComponent
- TailwindComponent
- Tailwinds::Form::SubmitButtonComponent
- Defined in:
- app/components/tailwinds/form/submit_button_component.rb
Overview
Tailwind-styled submit button
Constant Summary
Constants inherited from TailwindComponent
TailwindComponent::SIZE_CLASSES
Instance Method Summary collapse
-
#initialize(action, size: :middle, **options) ⇒ SubmitButtonComponent
constructor
A new instance of SubmitButtonComponent.
Methods included from Tramway::Helpers::ViewsHelper
#tramway_back_button, #tramway_badge, #tramway_button, #tramway_cell, #tramway_container, #tramway_flash, #tramway_form_for, #tramway_header, #tramway_row, #tramway_table, #tramway_title
Methods included from Tramway::Helpers::ComponentHelper
Methods included from Tramway::Helpers::DecorateHelper
Constructor Details
#initialize(action, size: :middle, **options) ⇒ SubmitButtonComponent
Returns a new instance of SubmitButtonComponent.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/components/tailwinds/form/submit_button_component.rb', line 7 def initialize(action, size: :middle, **) @text = action.is_a?(String) ? action : action.to_s.capitalize super( input: nil, attribute: nil, value: nil, options: .except(:type), label: nil, for: nil, size: ) end |