Class: Tailwinds::Nav::Item::LinkComponent
- Inherits:
-
TailwindComponent
- Object
- ViewComponent::Base
- Tramway::Component::Base
- TailwindComponent
- Tailwinds::Nav::Item::LinkComponent
- Defined in:
- app/components/tailwinds/nav/item/link_component.rb
Overview
Render button styled with Tailwind using link_to methods
Instance Method Summary collapse
-
#initialize(**options) ⇒ LinkComponent
constructor
A new instance of LinkComponent.
Methods included from Tramway::Helpers::ComponentHelper
Constructor Details
#initialize(**options) ⇒ LinkComponent
Returns a new instance of LinkComponent.
11 12 13 14 15 |
# File 'app/components/tailwinds/nav/item/link_component.rb', line 11 def initialize(**) @href = [:href] @style = 'text-white hover:bg-gray-300 hover:text-gray-800 px-4 py-2 rounded whitespace-nowrap' @options = Rules::TurboHtmlAttributesRules.prepare_turbo_html_attributes(options:) end |