Allow streams through the styled proxy
This commit is contained in:
parent
1c8d52253d
commit
f89b40e467
@ -38,7 +38,7 @@ export function el(sig, ...attrsOrChildren) {
|
|||||||
.join(' ');
|
.join(' ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (children.length === 1 && streamConfig.is(attrsOrChildren[0])) {
|
if (children.length === 1 && streamConfig.is(children[0])) {
|
||||||
children = children[0];
|
children = children[0];
|
||||||
}
|
}
|
||||||
return defineElement(sig, attrs, children);
|
return defineElement(sig, attrs, children);
|
||||||
@ -65,7 +65,12 @@ export function styled(...styles) {
|
|||||||
attrs.class += ' ' + injectStyle(attrs.css);
|
attrs.class += ' ' + injectStyle(attrs.css);
|
||||||
}
|
}
|
||||||
|
|
||||||
const children = props.slice(attrIndex + 1);
|
let children = props.slice(attrIndex + 1);
|
||||||
|
|
||||||
|
if (children.length === 1 && streamConfig.is(children[0])) {
|
||||||
|
children = children[0];
|
||||||
|
}
|
||||||
|
|
||||||
return el(tagName, attrs, children);
|
return el(tagName, attrs, children);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user