Sha256: 4b0337fe563dc61b6f407300dfe524fef0e7cb32f6ba30ff6c7851bcde44d179
Contents?: true
Size: 678 Bytes
Versions: 458
Compression:
Stored size: 678 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 notification notification_error primary], default: "neutral" def classname generate_classname("pb_badge_kit", variant_class, rounded_class) end private def variant_class variant === "success" ? "success_sm" : variant end def rounded_class rounded ? "rounded" : nil end end end end
Version data entries
458 entries across 458 versions & 1 rubygems