Text

The Text component allows the user to edit a single line of plain text.

Properties

Here's the Typescript interface for the props of the Text component:

interface TextProps {
propName: string
renderBlock: React.FC
placeholder: string
}

Properties definition

PropertyDefinition
propNameThe prop of the Brick component corresponding to this text.
renderBlockA React functional component used to render the text.
Typically it wraps the children.
placeholderThe placeholder to show when the text is empty.

Usage example

<Text
propName="claim"
renderBlock={(props: any) => (
<p
className="text-xl font-extrabold"
{...props.attributes}
>
{props.children}
</p>
)}
placeholder="Claim..."
/>