|
@@ -43,6 +43,7 @@ class Notification(Element, component='notification.js'):
|
|
|
|
|
|
Displays a notification on the screen.
|
|
|
In contrast to `ui.notify`, this element allows to update the notification message and other properties once the notification is displayed.
|
|
|
+ The notification can be removed with `dismiss()`.
|
|
|
|
|
|
:param message: content of the notification
|
|
|
:param position: position on the screen ("top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right" or "center", default: "bottom")
|
|
@@ -163,3 +164,7 @@ class Notification(Element, component='notification.js'):
|
|
|
def close_button(self, value: Union[bool, str]) -> None:
|
|
|
self._props['options']['closeBtn'] = value
|
|
|
self.update()
|
|
|
+
|
|
|
+ def dismiss(self) -> None:
|
|
|
+ """Dismiss the notification."""
|
|
|
+ self.run_method('dismiss')
|