2019-04-03 03:42:16 +00:00
|
|
|
package attribute
|
|
|
|
|
2023-12-20 22:35:09 +00:00
|
|
|
import "git.codemonkeysoftware.net/b/hatmill"
|
2019-04-03 03:42:16 +00:00
|
|
|
|
|
|
|
// CustomData creates an attribute of the form data-suffix='value'.
|
|
|
|
func CustomData(suffix, value string) hatmill.Attrib {
|
|
|
|
return hatmill.Attrib{
|
|
|
|
Key: "data-" + suffix,
|
2019-08-31 15:05:43 +00:00
|
|
|
Value: String(value),
|
2019-04-03 03:42:16 +00:00
|
|
|
}
|
|
|
|
}
|