Sha256: 36382cc43627542238ca949c4660ca58bda4e95bdc98301800c21c73066ee00a

Contents?: true

Size: 832 Bytes

Versions: 137

Compression:

Stored size: 832 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbFixedConfirmationToast
    class FixedConfirmationToast
      include Playbook::Props

      partial "pb_fixed_confirmation_toast/fixed_confirmation_toast"

      prop :status, type: Playbook::Props::Enum,
                    values: %w[success error neutral tip],
                    default: "neutral"
      prop :text, type: Playbook::Props::String

      def show_text?
        text.present?
      end

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

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

Version data entries

137 entries across 137 versions & 1 rubygems

Version Path
playbook_ui-7.0.1.pre.alpha10 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.1.pre.alpha9 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-6.5.1 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-6.5.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-6.4.2 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.1.pre.alpha1 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.0.pre.alpha9 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.0.pre.alpha8 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.0.pre.alpha7 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-6.4.1 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.0.pre.alpha6 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-7.0.0.pre.alpha5 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
playbook_ui-6.4.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb