class
Opal::UI::ToastManager
- Opal::UI::ToastManager
- Reference
- Object
Overview
Manages a collection of toast notifications and renders them over a target buffer.
Defined in:
opal/ui/components/toast.crInstance Method Summary
- #add(title : String, message : String = "", level : Symbol = :info, duration_ms : Int64 = 4000_i64) : Toast
- #any? : Bool
- #clean_expired(now : Time::Instant = Time.instant) : Nil
-
#render_overlay(buffer : Buffer, position : Symbol = :top_right, now : Time::Instant = Time.instant) : Nil
Renders all active toasts stacked in the top-right corner of the buffer
- #size : Int32
- #toasts : Array(Toast)
Instance Method Detail
def add(title : String, message : String = "", level : Symbol = :info, duration_ms : Int64 = 4000_i64) : Toast
#