You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
521 B
Go

package overlay
import (
"time"
"github.com/vugu/vugu"
)
type ToastSimple struct {
IconSlot vugu.Builder `vugu:"data"` // Slot for the symbol.
Message string `vugu:"data"`
Duration time.Duration // Auto close toast after this duration.
SignalColor string // A d3c CSS class for the color scheme of the small bar.
}
func (c *ToastSimple) OverlayClasses() (signalClasses, containerClasses string) {
return c.SignalColor, ""
}
func (c *ToastSimple) ToastDuration() time.Duration {
return c.Duration
}