Compare commits
2 Commits
1100f6ad01
...
65904850ac
| Author | SHA1 | Date | |
|---|---|---|---|
| 65904850ac | |||
| de7cd6d646 |
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@because/forge",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.8",
|
||||
"type": "module",
|
||||
"main": "src/index.tsx",
|
||||
"module": "src/index.tsx",
|
||||
|
|
|
|||
|
|
@ -189,6 +189,11 @@ function makeComponent(baseName: string, rootDef: TagDef, rootProps: Record<stri
|
|||
|
||||
const finalProps = { class: classNames.join(' '), ...baseAttrs, ...props, children }
|
||||
|
||||
if (finalProps.dangerouslySetInnerHTML) {
|
||||
const { children: _, ...rest } = finalProps
|
||||
return <Tag {...rest} />
|
||||
}
|
||||
|
||||
const content = (partName && def.render) ? def.render(finalProps) : children
|
||||
|
||||
return <Tag {...finalProps}>{content}</Tag>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user