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-4.9.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.8.2 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.8.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.7.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.7.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.6.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.6.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.5.2 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.5.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.5.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.4.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.4.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.3.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.3.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-4.2.0 app/pb_kits/playbook/pb_nav/nav.rb