Class: Playbook::PbUser::User

Inherits:
Object
  • Object
show all
Includes:
Playbook::Props
Defined in:
app/pb_kits/playbook/pb_user/user.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

#avatar_sizeObject



30
31
32
33
34
35
36
37
38
39
# File 'app/pb_kits/playbook/pb_user/user.rb', line 30

def avatar_size
  case size
  when "lg"
    "xl"
  when "md"
    "md"
  else
    "sm"
  end
end

#classnameObject



26
27
28
# File 'app/pb_kits/playbook/pb_user/user.rb', line 26

def classname
  generate_classname("pb_user_kit", align, orientation, size)
end

#detailsObject



45
46
47
# File 'app/pb_kits/playbook/pb_user/user.rb', line 45

def details
  [territory, title].reject(&:blank?).join("")
end

#title_sizeObject



41
42
43
# File 'app/pb_kits/playbook/pb_user/user.rb', line 41

def title_size
  size == "lg" ? 3 : 4
end