Skip to content

Commit

Permalink
feat: Meta widget model (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
lesleysin authored Feb 24, 2024
1 parent 397a6a1 commit f6e7b9f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/duit_attributes/meta_attributes.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package duit_attributes

type MetaAttributes map[string]interface{}
1 change: 1 addition & 0 deletions pkg/duit_core/element_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ const (
FittedBox DuitElementType = "FittedBox"
Switch DuitElementType = "Switch"
Subtree DuitElementType = "Subtree"
Meta DuitElementType = "Meta"
)
10 changes: 10 additions & 0 deletions pkg/duit_widget/meta.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package duit_widget

import (
"github.com/lesleysin/duit_go/pkg/duit_attributes"
"github.com/lesleysin/duit_go/pkg/duit_core"
)

func MetaUiElement(attributes *duit_attributes.MetaAttributes, id string) *duit_core.DuitElementModel {
return new(duit_core.DuitElementModel).CreateElement(duit_core.Meta, id, "", attributes, nil, true, 1, nil)
}

0 comments on commit f6e7b9f

Please sign in to comment.