Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
astro-wt
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
acf23c75
authored
2024-11-22 12:11:20 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Allow slotName/match to be a Component, by using an array(this might
change in the short term).
1 parent
8176f0ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
lib/match.astro
lib/match.astro
View file @
acf23c7
...
...
@@ -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}/>
}
...
...
Please
register
or
sign in
to post a comment