Sha256: 0b1edd578a8807c5bbd7bec76f5f35a799a13d0febb7aaa26a3c0c8d0f31499d

Contents?: true

Size: 1.07 KB

Versions: 491

Compression:

Stored size: 1.07 KB

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 bold],
                     default: "normal"
      prop :highlight, type: Playbook::Props::Boolean, default: true
      prop :borderless, type: Playbook::Props::Boolean, default: false
      prop :tabbing, type: Playbook::Props::Boolean, default: false

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

      def data
        if tabbing
          Hash(prop(:data)).merge(pb_nav_tab: true)
        else
          prop(:data)
        end
      end

      def highlight_class
        highlight ? "highlight" : nil
      end

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

Version data entries

491 entries across 491 versions & 1 rubygems

Version Path
playbook_ui-14.1.0.pre.alpha.PA1477timestampkit3601 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.1.0.pre.alpha.PBNTR462starratingdefaultvalue3600 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.1.0.pre.alpha.pbntr373enablekitsforradio3595 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.1.0.pre.alpha.pbntr373enablekitsforradio3593 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.2.0 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.1.0.pre.alpha.PBNTR462starratingdefaultvalue3582 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.1.0.pre.alpha.PBNTR462starratingdefaultvalue3579 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.1.0.pre.alpha.PBNTR455ganttchartPOC3569 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.1.0.pre.alpha.fixaction3547 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.1.0.pre.alpha.PA1477timestampkit3536 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.testthemeexport3533 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.updateviewcomponentgem3527 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.PLAY15063526 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.PLAY15063525 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.PLAY15063524 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.PLAY15063523 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.PLAY15063522 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.PBNTR416formpillsizes3521 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.PLAY15063520 app/pb_kits/playbook/pb_nav/nav.rb
playbook_ui-14.0.0.pre.alpha.PLAY14923518 app/pb_kits/playbook/pb_nav/nav.rb