toolbar-title.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package vuetify
  2. import (
  3. "context"
  4. "fmt"
  5. h "github.com/theplant/htmlgo"
  6. )
  7. type VToolbarTitleBuilder struct {
  8. tag *h.HTMLTagBuilder
  9. }
  10. func (b *VToolbarTitleBuilder) SetAttr(k string, v interface{}) {
  11. b.tag.SetAttr(k, v)
  12. }
  13. func (b *VToolbarTitleBuilder) Attr(vs ...interface{}) (r *VToolbarTitleBuilder) {
  14. b.tag.Attr(vs...)
  15. return b
  16. }
  17. func (b *VToolbarTitleBuilder) Children(children ...h.HTMLComponent) (r *VToolbarTitleBuilder) {
  18. b.tag.Children(children...)
  19. return b
  20. }
  21. func (b *VToolbarTitleBuilder) AppendChildren(children ...h.HTMLComponent) (r *VToolbarTitleBuilder) {
  22. b.tag.AppendChildren(children...)
  23. return b
  24. }
  25. func (b *VToolbarTitleBuilder) PrependChildren(children ...h.HTMLComponent) (r *VToolbarTitleBuilder) {
  26. b.tag.PrependChildren(children...)
  27. return b
  28. }
  29. func (b *VToolbarTitleBuilder) Class(names ...string) (r *VToolbarTitleBuilder) {
  30. b.tag.Class(names...)
  31. return b
  32. }
  33. func (b *VToolbarTitleBuilder) ClassIf(name string, add bool) (r *VToolbarTitleBuilder) {
  34. b.tag.ClassIf(name, add)
  35. return b
  36. }
  37. func (b *VToolbarTitleBuilder) On(name string, value string) (r *VToolbarTitleBuilder) {
  38. b.tag.Attr(fmt.Sprintf("v-on:%s", name), value)
  39. return b
  40. }
  41. func (b *VToolbarTitleBuilder) Bind(name string, value string) (r *VToolbarTitleBuilder) {
  42. b.tag.Attr(fmt.Sprintf("v-bind:%s", name), value)
  43. return b
  44. }
  45. func (b *VToolbarTitleBuilder) MarshalHTML(ctx context.Context) (r []byte, err error) {
  46. return b.tag.MarshalHTML(ctx)
  47. }