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-12.6.0.pre.alpha.collapsible1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.6.0.pre.alpha.cssphone1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.6.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.5.0.pre.alpha.datepickerinput1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.5.0.pre.alpha.phonerails1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.5.0.pre.alpha.datepicker1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.5.0.pre.alpha.filter1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.5.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.4.0.pre.alpha.map1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.4.0.pre.alpha.devdocstest1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.4.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.3.1.pre.alpha.phone1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.3.1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.3.0.pre.alpha.patchtest1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.3.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.2.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.1.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-12.0.0 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.20.0.pre.alpha.passthrough1 app/pb_kits/playbook/pb_badge/badge.rb
playbook_ui-11.20.0.pre.alpha.railsdialog1 app/pb_kits/playbook/pb_badge/badge.rb