tabs-slider.go 1.7 KB

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