@rendr-view/rendr-block
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.3 • Public • Published

@rendr-view/rendr-block

A simple block React compononent. Implements the Rendr blockRenderer to render Rendr blocks represented in JSON format.

Installation

yarn add @rendr-view/rendr-block

Props

The RendrBlock extends React.HTMLAttributes<HTMLDivElement> with these props:

export interface Props {
  clx?: {
    block?: string;
    inner?: string;
  }
  className?: string;
  blockRenderer?: BlockRenderer;
  blocks?: BlockDefinition[];
}

clx

An optional object of utility classes to be applied to the block elements.

className

An optional className to be applied to the RendrBlock root div.

blockRenderer

The Rendr blockRenderer. This is a function that renders blocks as React components. If you are using Rendr, the blockRenderer is passed to all root components.

blocks

A list of Rendr blocks.

Readme

Keywords

none

Package Sidebar

Install

npm i @rendr-view/rendr-block

Weekly Downloads

2

Version

0.0.1-alpha.3

License

MIT

Unpacked Size

16.1 kB

Total Files

14

Last publish

Collaborators

  • fiveid