2020-05-08 19:15:59 +01:00
|
|
|
/*
|
2024-09-09 14:57:16 +01:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2020-05-08 19:15:59 +01:00
|
|
|
Copyright 2020 The Matrix.org Foundation C.I.C.
|
2024-09-09 14:57:16 +01:00
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
2020-05-08 19:15:59 +01:00
|
|
|
|
2025-01-06 11:18:54 +00:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
2024-09-09 14:57:16 +01:00
|
|
|
Please see LICENSE files in the repository root for full details.
|
2020-05-08 19:15:59 +01:00
|
|
|
*/
|
|
|
|
|
|
2023-07-07 13:37:26 +01:00
|
|
|
import React, { forwardRef, ForwardRefExoticComponent } from "react";
|
2020-05-08 19:15:59 +01:00
|
|
|
|
2023-07-07 13:37:26 +01:00
|
|
|
import { IBodyProps } from "./IBodyProps";
|
2021-06-30 09:00:14 +01:00
|
|
|
|
2023-07-07 13:37:26 +01:00
|
|
|
export default forwardRef<HTMLDivElement, IBodyProps>(({ mxEvent, children }, ref) => {
|
2020-05-08 19:15:59 +01:00
|
|
|
const text = mxEvent.getContent().body;
|
|
|
|
|
return (
|
2022-04-20 07:48:38 +00:00
|
|
|
<div className="mx_UnknownBody" ref={ref}>
|
2020-05-08 19:15:59 +01:00
|
|
|
{text}
|
2021-06-18 18:59:22 +01:00
|
|
|
{children}
|
2022-04-20 07:48:38 +00:00
|
|
|
</div>
|
2020-05-08 19:15:59 +01:00
|
|
|
);
|
2023-07-07 13:37:26 +01:00
|
|
|
}) as ForwardRefExoticComponent<IBodyProps>;
|