Sha256: 2dad7b16778b2e6e8ef15d55d7f1d85589492894885bdf2ec8230b4d38216c46

Contents?: true

Size: 606 Bytes

Versions: 20

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbUserBadge
    class UserBadge
      include Playbook::Props

      partial "pb_user_badge/user_badge"

      prop :badge, type: Playbook::Props::Enum,
                   values: %w[million-dollar veteran],
                   default: "million-dollar"
      prop :size, type: Playbook::Props::Enum,
                  values: %w[sm md lg],
                  default: "md"

      def classname
        generate_classname("pb_user_badge_kit", size)
      end

      def display_badge
        "pb_user_badge/badges/#{badge}"
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
playbook_ui-4.4.1 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-4.4.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-4.3.1 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-4.3.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-4.2.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-4.1.2 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-4.1.1 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-4.1.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-4.0.1 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-4.0.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-3.5.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-3.4.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-3.3.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-3.2.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-3.1.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-3.0.1 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-3.0.0 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-2.9.9 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-2.9.8 app/pb_kits/playbook/pb_user_badge/user_badge.rb
playbook_ui-2.9.7 app/pb_kits/playbook/pb_user_badge/user_badge.rb