Sha256: cfc5003559867f564aba40e043a3355e42d8c0a4e060985999f61d6ed5d989e0

Contents?: true

Size: 375 Bytes

Versions: 27

Compression:

Stored size: 375 Bytes

Contents

module Coco
  class Link < Coco::Component
    include Concerns::Extendable
    include Concerns::ActsAsLink
    include Concerns::WithIcon

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

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
coveragebook_components-0.10.1.beta.2 app/components/coco/shared/link/link.rb
coveragebook_components-0.10.1.beta.1 app/components/coco/shared/link/link.rb
coveragebook_components-0.10.1.beta.0 app/components/coco/shared/link/link.rb
coveragebook_components-0.10.0 app/components/coco/base/link/link.rb
coveragebook_components-0.9.1 app/components/coco/base/link/link.rb
coveragebook_components-0.9.0 app/components/coco/base/link/link.rb
coveragebook_components-0.8.9 app/components/coco/base/link/link.rb
coveragebook_components-0.8.8 app/components/coco/base/link/link.rb
coveragebook_components-0.8.7 app/components/coco/base/link/link.rb
coveragebook_components-0.8.6 app/components/coco/base/link/link.rb
coveragebook_components-0.8.5 app/components/coco/base/link/link.rb
coveragebook_components-0.8.4 app/components/coco/base/link/link.rb
coveragebook_components-0.8.3 app/components/coco/base/link/link.rb
coveragebook_components-0.8.2 app/components/coco/base/link/link.rb
coveragebook_components-0.8.1 app/components/coco/base/link/link.rb
coveragebook_components-0.8.0 app/components/coco/base/link/link.rb
coveragebook_components-0.8.0.beta.3 app/components/coco/base/link/link.rb
coveragebook_components-0.8.0.beta.2 app/components/coco/base/link/link.rb
coveragebook_components-0.8.0.beta.1 app/components/coco/base/link/link.rb
coveragebook_components-0.7.10 app/components/coco/base/link/link.rb