Class: Playbook::PbFixedConfirmationToast::FixedConfirmationToast

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

Instance Method Summary collapse

Methods included from Playbook::Props

#generate_classname, #initialize, #prop

Instance Method Details

#classnameObject



32
33
34
# File 'app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb', line 32

def classname
  generate_classname("pb_fixed_confirmation_toast_kit", status)
end

#icon_valueObject



19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb', line 19

def icon_value
  case status
  when "success"
    "check"
  when "error"
    "exclamation-triangle"
  when "neutral"
    "info-circle"
  when "tip"
    "info-circle"
  end
end

#show_text?Boolean

Returns:



15
16
17
# File 'app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb', line 15

def show_text?
  text.present?
end