Sha256: 2132bbac7f5d8187d7763d78ec12be2b4a57876f830e4ff23c3227660588636b
Contents?: true
Size: 618 Bytes
Versions: 201
Compression:
Stored size: 618 Bytes
Contents
# frozen_string_literal: true module Playbook module PbAvatar class Avatar include Playbook::Props partial "pb_avatar/avatar" 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 end end end
Version data entries
201 entries across 201 versions & 1 rubygems
Version | Path |
---|---|
playbook_ui-2.9.7 | app/pb_kits/playbook/pb_avatar/avatar.rb |