acf23c75 by Adam Heath

Allow slotName/match to be a Component, by using an array(this might

change in the short term).
1 parent 8176f0ac
......@@ -18,8 +18,10 @@ for (const [ matcher, handler ] of replacers) {
}
const nextDebug = debug ? debug - 1 : 0
const [ Component, componentArgs ] = Array.isArray(slotName) ? slotName : []
---
{
slotName ? slotHandler(slotName, node)
Component ? (<Component {...componentArgs} debug={nextDebug} replacers={replacers} slotHandler={slotHandler}/>)
: slotName ? slotHandler(slotName, node)
: <Node parent={parent} node={node} index={index} debug={nextDebug} replacers={replacers} slotHandler={slotHandler}/>
}
......