Class: Playbook::PbAvatar::Avatar

Inherits:
Object
  • Object
show all
Includes:
Playbook::Props
Defined in:
app/pb_kits/playbook/pb_avatar/avatar.rb

Instance Method Summary collapse

Methods included from Playbook::Props

#dark_props, #generate_classname, #generate_classname_without_spacing, #initialize, #prop, #spacing_options, #spacing_props, #spacing_values

Instance Method Details

#classnameObject



21
22
23
# File 'app/pb_kits/playbook/pb_avatar/avatar.rb', line 21

def classname
  generate_classname("pb_avatar_kit", size)
end

#initialsObject



17
18
19
# File 'app/pb_kits/playbook/pb_avatar/avatar.rb', line 17

def initials
  name.split.map(&:first).join.downcase
end

#online_status_propsObject



25
26
27
# File 'app/pb_kits/playbook/pb_avatar/avatar.rb', line 25

def online_status_props
  { status: status, classname: "size_#{size}" }
end