forked from GoAdminGroup/go-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
description.go
50 lines (41 loc) · 1.09 KB
/
description.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package components
import (
"github.com/chenhg5/go-admin/template/types"
"html/template"
)
type DescriptionAttribute struct {
Name string
Border string
Number string
Title string
Arrow string
Color string
Percent string
}
func (compo *DescriptionAttribute) SetNumber(value string) types.DescriptionAttribute {
compo.Number = value
return compo
}
func (compo *DescriptionAttribute) SetTitle(value string) types.DescriptionAttribute {
compo.Title = value
return compo
}
func (compo *DescriptionAttribute) SetArrow(value string) types.DescriptionAttribute {
compo.Arrow = value
return compo
}
func (compo *DescriptionAttribute) SetPercent(value string) types.DescriptionAttribute {
compo.Percent = value
return compo
}
func (compo *DescriptionAttribute) SetColor(value string) types.DescriptionAttribute {
compo.Color = value
return compo
}
func (compo *DescriptionAttribute) SetBorder(value string) types.DescriptionAttribute {
compo.Border = value
return compo
}
func (compo *DescriptionAttribute) GetContent() template.HTML {
return ComposeHtml(*compo, "description")
}