We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34345f4 commit b392323Copy full SHA for b392323
src/tagFactory.ts
@@ -6,7 +6,7 @@ export const tagFactory = <T extends keyof HTMLElementTagNameMap>(tagName: T) =>
6
(props: HTMLElementAttributeMap[T], ...children: Children): HTMLElementTagNameMap[T] => {
7
const element = document.createElement(tagName)
8
9
- Object.entries(props).forEach(([name, value]) => element.setAttribute(name, value))
+ Object.entries(props).forEach(([name, value]) => element.setAttribute(name, String(value))) // TODO: class array, css in js
10
11
for(const child of children) {
12
if(child instanceof HTMLElement) {
0 commit comments