15 lines
551 B
Python
15 lines
551 B
Python
|
|
||
|
from pyscript_bootstrap_templates import bootstrap_templates
|
||
|
from pyscript_bootstrap_templates import bootstrap_HTML as bHTML
|
||
|
from pyscript_bootstrap_templates import HTML as HTML
|
||
|
|
||
|
app = bootstrap_templates.PyScriptBootstrapDashboard(
|
||
|
parent_element="pyscript_app", brand_name="hello_world")
|
||
|
div = bHTML.BootstrapContainer("This is a sidebar", parent=app.sidebar)
|
||
|
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)
|
||
|
|