Consolidate all EventTile bubble stuff into its own component and use it for the room continuation plinth

This commit is contained in:
Michael Telatynski 2020-11-04 17:00:07 +00:00
parent 971ade57bc
commit ff25a9b45d
13 changed files with 182 additions and 186 deletions

View file

@ -0,0 +1,34 @@
/*
Copyright 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React, {ReactNode} from "react";
import classNames from "classnames";
interface IProps {
className: string;
title: string;
subtitle?: ReactNode;
}
const EventTileBubble: React.FC<IProps> = ({ className, title, subtitle, children }) => {
return <div className={classNames("mx_EventTileBubble", className)}>
<div className="mx_EventTileBubble_title">{ title }</div>
{ subtitle && <div className="mx_EventTileBubble_subtitle">{ subtitle }</div> }
{ children }
</div>;
};
export default EventTileBubble;