Skip to main content

Interface: IListBlock

Defined in: packages/core/src/react/blocks/ListBlock.tsx:13

The common interface for a block transform component

Extends​

Properties​

block?​

optional block: ParsedBlock<IDataWPBlock>

Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:64

The block's attribute

Inherited from​

IBlock.block


blockContext?​

optional blockContext: BlockContext

Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:81

An optional context that is passed to all children components

Inherited from​

IBlock.blockContext


children?​

optional children: 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.

Inherited from​

IBlock.children


classList?​

optional classList: 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

Inherited from​

IBlock.classList


className?​

optional className: string

Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:93

Inherited from​

IBlock.className


component()​

component: (props) => null | ReactElement<any, string | JSXElementConstructor<any>>

Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:94

Parameters​

props​

ListBlockProps

Returns​

null | ReactElement<any, string | JSXElementConstructor<any>>

Inherited from​

IBlock.component


domNode?​

optional domNode: Element

Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:92

The actual domNode that was replaced with the react component

Inherited from​

IBlock.domNode


exclude()?​

optional exclude: (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​

Element

site?​

HeadlessConfig

Returns​

boolean

Inherited from​

IBlock.exclude


style?​

optional style: Record<string, string>

Defined in: packages/core/src/react/components/BaseBlocksRenderer.tsx:76

The style tag of the domNode as an object.

Inherited from​

IBlock.style


tagName?​

optional tagName: 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

Inherited from​

IBlock.tagName