Example #1
0
        public void Show(Control content, int timeout = 3000, ToasterType type = ToasterType.Normal)
        {
            _cleared = false;
            _timeout = timeout;
            var closeBtn = new IconButton(Icons.Close, (_) =>
            {
                Clear();
            });

            closeBtn.AddClass("toaster-close");
            var wrapper = new Div(content, closeBtn);

            wrapper.SetClass($"toaster-wrapper toaster-{type.ToString().ToLower()}");
            _lastWrapperId = wrapper.HtmlElement.ID;
            _dc.Content    = wrapper;
        }