Merge pull request #6291 from matrix-org/gsouquet/message-bubbles-4635

This commit is contained in:
Germain 2021-07-20 10:22:41 +01:00 committed by GitHub
commit 53ae7817bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 856 additions and 334 deletions

View file

@ -16,12 +16,19 @@ limitations under the License.
*/
import React, { forwardRef } from "react";
import { MatrixEvent } from "matrix-js-sdk/src";
export default forwardRef(({ mxEvent }, ref) => {
interface IProps {
mxEvent: MatrixEvent;
children?: React.ReactNode;
}
export default forwardRef(({ mxEvent, children }: IProps, ref: React.RefObject<HTMLSpanElement>) => {
const text = mxEvent.getContent().body;
return (
<span className="mx_UnknownBody" ref={ref}>
{ text }
{ children }
</span>
);
});