mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 20:26:19 +02:00
tighten example
This commit is contained in:
parent
60687b27a6
commit
8cf426f0e7
@ -69,8 +69,6 @@ export interface CustomComponentsApi {
|
||||
// @alpha
|
||||
export type CustomMessageComponentProps = {
|
||||
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
|
||||
|
||||
@ -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;
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user