Class: Playbook::PbStatChange::StatChange

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



37
38
39
# File 'app/pb_kits/playbook/pb_stat_change/stat_change.rb', line 37

def classname
  generate_classname("pb_stat_change_kit", status)
end

#iconObject



26
27
28
29
30
31
32
33
34
35
# File 'app/pb_kits/playbook/pb_stat_change/stat_change.rb', line 26

def icon
  case change
  when "increase"
    "arrow-up"
  when "decrease"
    "arrow-down"
  else
    false
  end
end

#statusObject



15
16
17
18
19
20
21
22
23
24
# File 'app/pb_kits/playbook/pb_stat_change/stat_change.rb', line 15

def status
  case change
  when "increase"
    "positive"
  when "decrease"
    "negative"
  else
    "neutral"
  end
end