Class: Tailwinds::Nav::Item::ButtonComponent

Inherits:
Tailwinds::Nav::ItemComponent show all
Defined in:
app/components/tailwinds/nav/item/button_component.rb

Overview

Render button styled with Tailwind using button_to methods

Constant Summary

Constants inherited from TailwindComponent

TailwindComponent::SIZE_CLASSES

Instance Method Summary collapse

Methods inherited from Tailwinds::Nav::ItemComponent

#style

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

#component

Methods included from Tramway::Helpers::DecorateHelper

#tramway_decorate

Constructor Details

#initialize(**options) ⇒ ButtonComponent

Returns a new instance of ButtonComponent.



11
12
13
14
15
# File 'app/components/tailwinds/nav/item/button_component.rb', line 11

def initialize(**options)
  @href = options[:href]
  @method = options[:method]
  @options = options.except(:href, :method)
end