Added explicit bool attribute type
This commit is contained in:
@ -139,10 +139,10 @@ func Content(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Contenteditable creates a "contenteditable" attribute
|
||||
func Contenteditable(value string) hatmill.Attrib {
|
||||
func Contenteditable(value bool) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "contenteditable",
|
||||
Value: value,
|
||||
Value: strconv.FormatBool(value),
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,10 +239,10 @@ func Download(value string) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Draggable creates a "draggable" attribute
|
||||
func Draggable(value string) hatmill.Attrib {
|
||||
func Draggable(value bool) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "draggable",
|
||||
Value: value,
|
||||
Value: strconv.FormatBool(value),
|
||||
}
|
||||
}
|
||||
|
||||
@ -644,10 +644,10 @@ func Span(value int) hatmill.Attrib {
|
||||
}
|
||||
|
||||
// Spellcheck creates a "spellcheck" attribute
|
||||
func Spellcheck(value string) hatmill.Attrib {
|
||||
func Spellcheck(value bool) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "spellcheck",
|
||||
Value: value,
|
||||
Value: strconv.FormatBool(value),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user