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

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

Instance Method Details

#classnameObject



38
39
40
# File 'app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb', line 38

def classname
  generate_classname("pb_fixed_confirmation_toast_kit", status) + close_class
end

#close_classObject



21
22
23
# File 'app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb', line 21

def close_class
  closeable.present? ? " remove_toast" : ""
end

#icon_valueObject



25
26
27
28
29
30
31
32
33
34
35
36
# File 'app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb', line 25

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:



17
18
19
# File 'app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb', line 17

def show_text?
  text.present?
end