Sha256: a681cb1b95b33d4b30a4b584d94bed8f9c18f951b8a935dcb50a9c61274168de

Contents?: true

Size: 797 Bytes

Versions: 135

Compression:

Stored size: 797 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbNav
    class Nav
      include ActionView::Helpers::TagHelper
      include Playbook::Props

      partial "pb_nav/nav"

      prop :link, default: "#"
      prop :title
      prop :orientation, type: Playbook::Props::Enum,
                         values: %w[vertical horizontal],
                         default: "vertical"
      prop :variant, type: Playbook::Props::Enum,
                     values: %w[normal subtle],
                     default: "normal"
      prop :highlight, type: Playbook::Props::Boolean, default: true

      def classname
        generate_classname("pb_nav_list", variant, orientation, highlight_class)
      end

      def highlight_class
        highlight ? "highlight" : nil
      end
    end
  end
end

Version data entries

135 entries across 135 versions & 1 rubygems

Version Path
playbook_ui-7.3.0.pre.alpha2 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.1.2 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.1.0.pre.alpha2 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.1.1.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.0.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.1.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.1.0.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.1.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.0.1.pre.alpha15 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-6.8.2.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.0.0.pre.alpha15 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.0.1.pre.alpha14 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.0.0.pre.alpha14 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.0.0.pre.alpha13 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.0.0.pre.alpha12 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.0.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.0.0.pre.alpha11 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-6.8.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-6.8.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-6.7.0.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb