Specify options for the original component.

This commit is contained in:
Half-Shot
2025-06-05 09:58:51 +01:00
parent 546861811c
commit e2ae6f2288
3 changed files with 22 additions and 10 deletions
@@ -22,16 +22,23 @@ export type CustomMessageComponentProps = {
* May be undefined if the client does not need to highlight
*/
highlights?: string[];
/**
* Should previews be shown for this event
*/
showUrlPreview?: boolean;
/**
* Is this event being rendered to a static export
*/
forExport?: boolean;
};
/**
* Properties to alter the render function of the original component.
* @alpha Subject to change.
*/
export type OriginalComponentProps = {
/**
* Should previews be shown for this event.
*/
showUrlPreview?: boolean;
};
/**
* Function used to render a message component.
* @beta Unlikely to change
@@ -44,7 +51,7 @@ export type CustomMessageRenderFunction = (
/**
* Render function for the original component. This may be omitted if the message would not normally be rendered.
*/
originalComponent?: () => React.JSX.Element,
originalComponent?: (props?: OriginalComponentProps) => React.JSX.Element,
) => JSX.Element | null;
/**