Sha256: f1deef3cc0bd1eaa739fe61aadda04b3db9653354030ce29f6e7f3345aa2c2e3
Contents?: true
Size: 649 Bytes
Versions: 18
Compression:
Stored size: 649 Bytes
Contents
# frozen_string_literal: true module Playbook module PbAvatar class Avatar < Playbook::KitBase prop :image_url prop :name, default: "" prop :size, type: Playbook::Props::Enum, values: %w[xs sm md base lg xl], default: "md" prop :status def initials name.split.map(&:first).join.downcase end def classname generate_classname("pb_avatar_kit", size) end def online_status_props { status: status, classname: "size_#{size}" } end def handle_img_error "this.style.display = 'none'" end end end end
Version data entries
18 entries across 18 versions & 1 rubygems