Skip to main content

Interface: IVerseBlock

@headstartwp/core.react.IVerseBlock

The common interface for a block transform component

Hierarchy

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.

Inherited from

IBlock.children

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

Inherited from

IBlock.classList

Defined in

packages/core/src/react/components/BlocksRenderer.tsx:44


className

Optional className: string

Inherited from

IBlock.className

Defined in

packages/core/src/react/components/BlocksRenderer.tsx:69


component

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

Type declaration

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

Parameters
NameType
propsVerseBlockProps
Returns

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

Inherited from

IBlock.component

Defined in

packages/core/src/react/components/BlocksRenderer.tsx:70


domNode

Optional domNode: Element

Inherited from

IBlock.domNode

Defined in

packages/core/src/react/components/BlocksRenderer.tsx:68


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
NameType
childNodeElement
site?HeadlessConfig
Returns

boolean

Inherited from

IBlock.exclude

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.

Inherited from

IBlock.style

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

Inherited from

IBlock.tagName

Defined in

packages/core/src/react/components/BlocksRenderer.tsx:37