tighten example

This commit is contained in:
Half-Shot
2025-06-05 16:57:48 +01:00
parent 60687b27a6
commit 8cf426f0e7
2 changed files with 5 additions and 3 deletions
@@ -70,7 +70,11 @@ export interface CustomComponentsApi {
* return <YourCustomComponent mxEvent={props.mxEvent} />;
* });
* 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;
* });
* ```
*/