-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.go
73 lines (62 loc) · 1.91 KB
/
options.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package tailush
type FormHelperOption func(*form)
// UseFieldContainerClass is used to override the default classes for the container element.
func UseFieldContainerClass(class string) FormHelperOption {
return func(f *form) {
f.fieldContainerClass = class
}
}
// UseLabelClass is used to override the default classes for the label element.
func UseLabelClass(class string) FormHelperOption {
return func(f *form) {
f.labelClass = class
}
}
// UseInputClass is used to override the default classes for the input element.
func UseInputClass(class string) FormHelperOption {
return func(f *form) {
f.inputClass = class
}
}
// UseCheckboxClass is used to override the default classes for the checkbox element.
func UseCheckboxClass(class string) FormHelperOption {
return func(f *form) {
f.checkboxClass = class
}
}
// UseRadioClass is used to override the default classes for the radio element.
func UseRadioClass(class string) FormHelperOption {
return func(f *form) {
f.radioClass = class
}
}
// UseFileClass is used to override the default classes for the file element.
func UseFileClass(class string) FormHelperOption {
return func(f *form) {
f.fileClass = class
}
}
// UseTextAreaClass is used to override the default classes for the textarea element.
func UseTextAreaClass(class string) FormHelperOption {
return func(f *form) {
f.textAreaClass = class
}
}
// UseSelectClass is used to override the default classes for the select element.
func UseSelectClass(class string) FormHelperOption {
return func(f *form) {
f.selectClass = class
}
}
// UseErrorClass is used to override the default classes for the errors.
func UseErrorClass(class string) FormHelperOption {
return func(f *form) {
f.errorClass = class
}
}
// UseDateInputClass is used to override the default classes for the errors.
func UseDateInputClass(class string) FormHelperOption {
return func(f *form) {
f.dateInputClass = class
}
}