Class: Coco::Link

Inherits:
Component
  • Object
show all
Includes:
Concerns::ActsAsLink, Concerns::Extendable, Concerns::WithIcon
Defined in:
app/components/coco/base/link/link.rb

Direct Known Subclasses

App::Elements::Link

Instance Method Summary collapse

Methods included from Concerns::AcceptsOptions

#accepted_options, #get_option_group

Methods included from Concerns::ActsAsLink

#link_text

Instance Method Details

#call ⇒ Object



11
12
13
14
15
16
17
18
# File 'app/components/coco/base/link/link.rb', line 11

def call
  render component_tag(class: "coco-link") do
    safe_join([
      icon,
      icon? ? tag.span(link_text, class: "link-text") : link_text
    ])
  end
end