Sha256: 7e2edb411ff6133207befa6ded4656f385108629b43473d8982a8b38c6a31e02

Contents?: true

Size: 964 Bytes

Versions: 52

Compression:

Stored size: 964 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
      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

52 entries across 52 versions & 1 rubygems

Version Path
playbook_ui-7.14.0.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.16.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.15.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.15.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.14.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.13.0.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.13.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.12.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.12.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.11.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.11.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.11.0.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.10.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.9.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.8.4 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.8.3 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.8.2 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.8.1 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.8.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-7.7.0.pre.alpha1 app/pb_kits/playbook/pb_nav/nav.rb