bricks/examples/button.html

58 lines
963 B
HTML
Raw Normal View History

2023-09-14 10:28:07 +08:00
<html>
<head>
<link rel="stylesheet" href="/bricks/css/bricks.css">
</head>
<body>
<script src="/bricks/bricks.js"></script>
<script>
const opts =
{
"widget": {
"widgettype":"HBox",
"options":{
"height":"auto",
"width":"100%"
},
"subwidgets":[
{
"widgettype":"Button",
"options":{
"name":"test",
"icon":"/bricks/imgs/submit.png",
"label":"test once",
"tooltip":"This is a joke too",
"nonepack":true,
"orientation":"horizontal"
}
},
{
"widgettype":"Button",
"options":{
"name":"test",
"icon":"/bricks/imgs/reset.png",
"tooltip":"This is a joke",
"label":"test twice",
"nonepack":true,
"orientation":"horizontal"
}
}
],
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"script",
"script":"alert('HBox clicked');"
}
]
}
}
;
const app = new BricksApp(opts);
app.run();
</script>
</body>
</html>