adding simple toasts

This commit is contained in:
2022-09-13 16:51:43 +02:00
parent 01e083addb
commit c0bb89c752
5 changed files with 55 additions and 2 deletions

View File

@ -10,6 +10,13 @@ div.font_size = 4
btn = bHTML.ButtonPrimary("Click me", parent=app.sidebar)
btn.w = 100
btn.onclick = lambda _: bHTML.AlertSuccess(
"You clicked me!", parent=app.main_area)
def onclick(_):
alert = bHTML.AlertSuccess("You clicked me!", parent=app.main_area)
toast = bHTML.Toast("You clicked me!", parent=app.main_area)
toast.position_bottom = 0
toast.position_end = 0
toast.show()
btn.onclick = onclick