Class: FoxTail::LinkComponent

Inherits:
ClickableComponent show all
Defined in:
app/components/fox_tail/link_component.rb

Instance Attribute Summary

Attributes inherited from BaseComponent

#html_attributes

Instance Method Summary collapse

Methods inherited from ClickableComponent

#before_render, #call, #link?, #root_tag_name, stimulus_controller_name, #stimulus_controller_options, #use_stimulus?

Methods inherited from BaseComponent

classname_merger, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class

Methods inherited from Base

fox_tail_config

Constructor Details

#initialize(url, html_attributes = {}) ⇒ LinkComponent

Returns a new instance of LinkComponent.



6
7
8
# File 'app/components/fox_tail/link_component.rb', line 6

def initialize(url, html_attributes = {})
  super(html_attributes.merge(url: url))
end