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
Property | Definition |
---|---|
propName | The prop of the Brick component corresponding to this text. |
renderBlock | A React functional component used to render the text. Typically it wraps the children. |
placeholder | The 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..."/>