fab-transition.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. package vuetify
  2. import (
  3. "context"
  4. "fmt"
  5. h "github.com/theplant/htmlgo"
  6. )
  7. type VFabTransitionBuilder struct {
  8. tag *h.HTMLTagBuilder
  9. }
  10. func VFabTransition(children ...h.HTMLComponent) (r *VFabTransitionBuilder) {
  11. r = &VFabTransitionBuilder{
  12. tag: h.Tag("v-fab-transition").Children(children...),
  13. }
  14. return
  15. }
  16. func (b *VFabTransitionBuilder) Group(v bool) (r *VFabTransitionBuilder) {
  17. b.tag.Attr(":group", fmt.Sprint(v))
  18. return b
  19. }
  20. func (b *VFabTransitionBuilder) HideOnLeave(v bool) (r *VFabTransitionBuilder) {
  21. b.tag.Attr(":hide-on-leave", fmt.Sprint(v))
  22. return b
  23. }
  24. func (b *VFabTransitionBuilder) LeaveAbsolute(v bool) (r *VFabTransitionBuilder) {
  25. b.tag.Attr(":leave-absolute", fmt.Sprint(v))
  26. return b
  27. }
  28. func (b *VFabTransitionBuilder) Mode(v string) (r *VFabTransitionBuilder) {
  29. b.tag.Attr("mode", v)
  30. return b
  31. }
  32. func (b *VFabTransitionBuilder) Origin(v string) (r *VFabTransitionBuilder) {
  33. b.tag.Attr("origin", v)
  34. return b
  35. }
  36. func (b *VFabTransitionBuilder) SetAttr(k string, v interface{}) {
  37. b.tag.SetAttr(k, v)
  38. }
  39. func (b *VFabTransitionBuilder) Attr(vs ...interface{}) (r *VFabTransitionBuilder) {
  40. b.tag.Attr(vs...)
  41. return b
  42. }
  43. func (b *VFabTransitionBuilder) Children(children ...h.HTMLComponent) (r *VFabTransitionBuilder) {
  44. b.tag.Children(children...)
  45. return b
  46. }
  47. func (b *VFabTransitionBuilder) AppendChildren(children ...h.HTMLComponent) (r *VFabTransitionBuilder) {
  48. b.tag.AppendChildren(children...)
  49. return b
  50. }
  51. func (b *VFabTransitionBuilder) PrependChildren(children ...h.HTMLComponent) (r *VFabTransitionBuilder) {
  52. b.tag.PrependChildren(children...)
  53. return b
  54. }
  55. func (b *VFabTransitionBuilder) Class(names ...string) (r *VFabTransitionBuilder) {
  56. b.tag.Class(names...)
  57. return b
  58. }
  59. func (b *VFabTransitionBuilder) ClassIf(name string, add bool) (r *VFabTransitionBuilder) {
  60. b.tag.ClassIf(name, add)
  61. return b
  62. }
  63. func (b *VFabTransitionBuilder) On(name string, value string) (r *VFabTransitionBuilder) {
  64. b.tag.Attr(fmt.Sprintf("v-on:%s", name), value)
  65. return b
  66. }
  67. func (b *VFabTransitionBuilder) Bind(name string, value string) (r *VFabTransitionBuilder) {
  68. b.tag.Attr(fmt.Sprintf("v-bind:%s", name), value)
  69. return b
  70. }
  71. func (b *VFabTransitionBuilder) MarshalHTML(ctx context.Context) (r []byte, err error) {
  72. return b.tag.MarshalHTML(ctx)
  73. }