@tempots/dom
dataAttr variable
The data
object allows to create any data-
attributes. Either a literal value or Signal
can be passed as a value.
Signature:
dataAttr: {
[x: string]: (value: Value<string>) => Renderable;
}
Example
const button = html.button(
dataAttr.myinfo('something'), // maps to the `data-myinfo` attribute
)