Sha256: 65fccb0ebed706e625e28551097fd0099d9cfe949479c8277a8889dccffd4284

Contents?: true

Size: 586 Bytes

Versions: 88

Compression:

Stored size: 586 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbMultipleUsers
    class MultipleUsers < Playbook::KitBase
      prop :reverse, type: Playbook::Props::Boolean, default: false
      prop :users, type: Playbook::Props::HashArray, required: true

      def more_than_four
        users.count > 4
      end

      def display_count
        more_than_four ? 3 : users.count
      end

      def classname
        generate_classname("pb_multiple_users_kit", reverse_class)
      end

    private

      def reverse_class
        reverse ? "reverse" : nil
      end
    end
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
playbook_ui-10.0.0.pre.alphafonts app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-10.0.1 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.19.0.pre.alpha.pre.fonts2 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.19.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.18.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.17.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.16.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.15.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.14.1 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.13.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.12.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.11.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.10.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb