IClassicRendering interface
đ Descriptionâ
Interface that specifies the block renderer interface. Used when creating custom blocks.
đ Type declarationâ
interface IClassicRendering { required?: boolean;ReadonlyOptional hideRequiredIndicatorFromName?: boolean;ReadonlyOptional marginAroundBlock?: boolean;ReadonlyOptional render?: (props: IClassicRenderProps) => ReactNode;FunctionOptional }
đąī¸ Hover with the mouse over a property name for a tooltip with the description of that property. Click it for more information.
đī¸ Propertiesâ
đˇī¸ hideRequiredIndicatorFromName
â
Specifies if the required asterisk (*) should be invisible. If this property is not specified or set to false
, the required indicator is shown for required blocks.
Typeâ
boolean
đˇī¸ marginAroundBlock
â
Specifies if a margin around the block should be shown.
Typeâ
boolean
đˇī¸ required
â
Specifies if the block is required.
Typeâ
boolean
âļī¸ Functionsâ
đ§ render
â
Specifies a function that is invoked when the block needs to render. This function should return a valid React component.
Signatureâ
(props: IClassicRenderProps) => ReactNode
Parametersâ
Name | Type | Optional | Description |
---|---|---|---|
props | IClassicRenderProps | No | Contains the rendering props. |
Return valueâ
Returns the ReactNode
for the block.
tip
Read the Custom blocks guide for an example.