tighten example
This commit is contained in:
@@ -69,8 +69,6 @@ export interface CustomComponentsApi {
|
|||||||
// @alpha
|
// @alpha
|
||||||
export type CustomMessageComponentProps = {
|
export type CustomMessageComponentProps = {
|
||||||
mxEvent: MatrixEvent;
|
mxEvent: MatrixEvent;
|
||||||
highlights?: string[];
|
|
||||||
forExport?: boolean;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Warning: (ae-incompatible-release-tags) The symbol "CustomMessageRenderFunction" is marked as @beta, but its signature references "CustomMessageComponentProps" which is marked as @alpha
|
// Warning: (ae-incompatible-release-tags) The symbol "CustomMessageRenderFunction" is marked as @beta, but its signature references "CustomMessageComponentProps" which is marked as @alpha
|
||||||
|
|||||||
@@ -70,7 +70,11 @@ export interface CustomComponentsApi {
|
|||||||
* return <YourCustomComponent mxEvent={props.mxEvent} />;
|
* return <YourCustomComponent mxEvent={props.mxEvent} />;
|
||||||
* });
|
* });
|
||||||
* customComponents.registerMessageRenderer(/m\.room\.(topic|name)/, (props, originalComponent) => {
|
* customComponents.registerMessageRenderer(/m\.room\.(topic|name)/, (props, originalComponent) => {
|
||||||
* return <YourCustomStateRenderer mxEvent={props.mxEvent} />;
|
* if (props.mxEvent.isState()) {
|
||||||
|
* return <YourCustomStateRenderer mxEvent={props.mxEvent} />;
|
||||||
|
* }
|
||||||
|
* // Passthrough.
|
||||||
|
* return null;
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user