card-title.go 1.5 KB

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