2023-05-19 21:45:39 +00:00
|
|
|
package overlay
|
|
|
|
|
2023-05-28 13:04:18 +00:00
|
|
|
import "time"
|
|
|
|
|
2023-05-19 21:45:39 +00:00
|
|
|
// OverlayClassesGetter can be implemented by components that are used in overlays.
|
|
|
|
// With this mechanic these components can set additional CSS classes to the modal or toast container.
|
|
|
|
// One use case is to give a toast or modal some other color with the `d3c-color-*` classes.
|
|
|
|
type OverlayClassesGetter interface {
|
|
|
|
OverlayClasses() (signalClasses, containerClasses string)
|
|
|
|
}
|
2023-05-28 13:04:18 +00:00
|
|
|
|
|
|
|
// ToastDurationGetter can be implemented by toast components to signal that the toast should close automatically after some given duration.
|
|
|
|
type ToastDurationGetter interface {
|
|
|
|
ToastDuration() time.Duration
|
|
|
|
}
|