Interface: BlockProps<BlockAttributes, Context>
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:24
The interface any children of BlocksRenderer must implement.
Type Parameters
BlockAttributes
BlockAttributes extends IDataWPBlock = IDataWPBlock
Context
Context extends BlockContext = BlockContext
Properties
block?
optionalblock:ParsedBlock<BlockAttributes>
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:64
The block's attribute
blockContext?
optionalblockContext:Context
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:81
An optional context that is passed to all children components
children?
optionalchildren:ReactNode
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:71
The children of the domNode that was replaced with the react component
Note: the children of the domNode are recursively parsed.
classList?
optionalclassList:string|string[]
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:54
The class name of the domNode that should be replaced with the react component
If tagName is specified, then classList is mandatory
domNode?
optionaldomNode:Element
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:59
The actual domNode that was replaced with the react component
exclude()?
optionalexclude: (childNode,site?) =>boolean
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:40
An optional exclude function that also receives a domNode and is executed against every child of the node being replaced with a react component.
This is useful to selectively disregard certain children of a node when replacing with a react component.
Parameters
childNode
site?
Returns
boolean
style?
optionalstyle:Record<string,string>
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:76
The style tag of the domNode as an object.
tagName?
optionaltagName:string
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:47
The tag name of the domNode that should be replaced with the react component
If a test function is not supplied, then passing tagName is mandatory
test()?
optionaltest: (domNode,site?) =>boolean
Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:32
A test function receives a domNode and returns a boolean value indicating whether that domNode should be replaced with the React component
Parameters
domNode
site?
Returns
boolean