Sha256: 05e7913aa33b11a278e5b3b5830cc47fd1c35ec041fc1aa4b351d386f40afd0b

Contents?: true

Size: 550 Bytes

Versions: 294

Compression:

Stored size: 550 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbBadge
    class Badge < Playbook::KitBase
      prop :rounded, type: Playbook::Props::Boolean, default: false
      prop :text
      prop :variant, type: Playbook::Props::Enum,
                     values: %w[success warning error info neutral primary],
                     default: "neutral"

      def classname
        generate_classname("pb_badge_kit", variant, rounded_class)
      end

    private

      def rounded_class
        rounded ? "rounded" : nil
      end
    end
  end
end

Version data entries

294 entries across 294 versions & 1 rubygems

Version Path
playbook_ui-11.20.0.pre.alpha.focus1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.20.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.19.0.pre.alpha.map1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.19.0.pre.alpha.pagpassthrough1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.19.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.18.0.pre.alpha.pagutility1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.19.0.pre.typeahead1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.18.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.17.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.15.0.pre.alpha.dependencies1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.16.0.pre.alpha.paginationrails1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.16.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.16.0.pre.alpha.reactupgrade1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.15.0.pre.alpha.table1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.16.0.pre.alpha.pagination.rails1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.15.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.14.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.13.0.pre.alpha.fontawesome1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.13.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.12.1.pre.alpha.charts1 app/pb_kits/playbook/pb_badge/badge.rb