Sha256: 303535a4740dcd4dfbd7cb56d927f91c962465e5a9a4f27a87db6907e79e538a

Contents?: true

Size: 343 Bytes

Versions: 8

Compression:

Stored size: 343 Bytes

Contents

module Spina
  module MainNavigation
    class LinkComponent < ApplicationComponent
      def initialize(label, path, active: false)
        @label = label
        @path = path
        @active = active
      end

      def css_classes
        if @active
          ""
        else
          "opacity-50"
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
spina-2.18.0 app/components/spina/main_navigation/link_component.rb
spina-2.17.0 app/components/spina/main_navigation/link_component.rb
spina-2.16.0 app/components/spina/main_navigation/link_component.rb
spina-2.15.1 app/components/spina/main_navigation/link_component.rb
spina-2.15.0 app/components/spina/main_navigation/link_component.rb
spina-2.14.0 app/components/spina/main_navigation/link_component.rb
spina-2.13.1 app/components/spina/main_navigation/link_component.rb
spina-2.13.0 app/components/spina/main_navigation/link_component.rb