ids and classes

This commit is contained in:
2024-09-30 14:10:00 +02:00
parent bf70ceacf1
commit 705bd8d61b
5 changed files with 85 additions and 44 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ import (
"github.com/orus-dev/osui/isKey"
)
type BtnParams struct {
type ButtonParams struct {
Style ButtonStyle
Toggle bool
OnClick func(*ButtonComponent) bool
@@ -92,7 +92,7 @@ func (b *ButtonComponent) GetComponentData() *osui.ComponentData {
return &b.Data
}
func (b *ButtonComponent) Params(param BtnParams) *ButtonComponent {
func (b *ButtonComponent) Params(param ButtonParams) *ButtonComponent {
b.Style = osui.SetDefaults(&param.Style).(*ButtonStyle)
if param.OnClick != nil {
b.on_click = param.OnClick