Sha256: dc75f343dc1422975b751eab80385c046c465a34ac37f5965f1aaceddde4ab33

Contents?: true

Size: 880 Bytes

Versions: 127

Compression:

Stored size: 880 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbNav
    class Nav < Playbook::KitBase
      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
      prop :borderless, type: Playbook::Props::Boolean, default: false

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

      def highlight_class
        highlight ? "highlight" : nil
      end

      def borderless_class
        borderless ? "borderless" : nil
      end
    end
  end
end

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
playbook_ui-10.18.2 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.18.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.18.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.17.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.16.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.15.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.15.1.pre.alpha.rubocop.deps app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.15.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.14.1.pre.alpha2 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.14.1.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.14.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.13.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.13.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.13.0.pre.node.update app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.12.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.11.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.10.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.9.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.8.1.pre.alpha.flexdeps app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-10.9.0.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb