Interface: BlockProps
@headstartwp/core.react.BlockProps
The interface any children of BlocksRenderer must implement.
Properties
children
• Optional
children: ReactNode
The children of the domNode that was replaced with the react component
Note: the children of the domNode are recursively parsed.
Defined in
packages/core/src/react/components/BlocksRenderer.tsx:56
classList
• Optional
classList: string
| string
[]
The class name of the domNode that should be replaced with the react component
If tagName is specified, then classList is mandatory
Defined in
packages/core/src/react/components/BlocksRenderer.tsx:44
domNode
• Optional
domNode: Element
The actual domNode that was replaced with the react component
Defined in
packages/core/src/react/components/BlocksRenderer.tsx:49
exclude
• Optional
exclude: (childNode
: Element
, site?
: HeadlessConfig
) => boolean
Type declaration
▸ (childNode
, site?
): boolean
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
Name | Type |
---|---|
childNode | Element |
site? | HeadlessConfig |
Returns
boolean
Defined in
packages/core/src/react/components/BlocksRenderer.tsx:30
style
• Optional
style: Record
<string
, string
>
The style tag of the domNode as an object.
Defined in
packages/core/src/react/components/BlocksRenderer.tsx:61
tagName
• Optional
tagName: string
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
Defined in
packages/core/src/react/components/BlocksRenderer.tsx:37
test
• Optional
test: (domNode
: Element
, site?
: HeadlessConfig
) => boolean
Type declaration
▸ (domNode
, site?
): boolean
A test function receives a domNode and returns a boolean value indicating whether that domNode should be replaced with the React component
Parameters
Name | Type |
---|---|
domNode | Element |
site? | HeadlessConfig |
Returns
boolean