github.com/kotovmak/go-admin@v1.1.1/template/components/tabs.go (about)

     1  package components
     2  
     3  import (
     4  	"html/template"
     5  
     6  	"github.com/kotovmak/go-admin/template/types"
     7  )
     8  
     9  type TabsAttribute struct {
    10  	Name string
    11  	Data []map[string]template.HTML
    12  	types.Attribute
    13  }
    14  
    15  func (compo *TabsAttribute) SetData(value []map[string]template.HTML) types.TabsAttribute {
    16  	compo.Data = value
    17  	return compo
    18  }
    19  
    20  func (compo *TabsAttribute) GetContent() template.HTML {
    21  	return ComposeHtml(compo.TemplateList, compo.Separation, *compo, "tabs")
    22  }