expansion-panel-content.go 2.1 KB

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