1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-12-05 15:22:09 +03:00

Make rooms and spaces list responsive (#8088)

This commit is contained in:
Suguru Hirahara
2022-03-24 08:50:02 +00:00
committed by GitHub
parent a5589d40e2
commit d92977df9e
2 changed files with 151 additions and 132 deletions

View File

@@ -206,24 +206,27 @@ const Tile: React.FC<ITileProps> = ({
}
const content = <React.Fragment>
{ avatar }
<div className="mx_SpaceHierarchy_roomTile_name">
{ name }
{ joinedSection }
{ suggestedSection }
</div>
<div
className="mx_SpaceHierarchy_roomTile_info"
ref={e => e && linkifyElement(e)}
onClick={ev => {
// prevent clicks on links from bubbling up to the room tile
if ((ev.target as HTMLElement).tagName === "A") {
ev.stopPropagation();
}
}}
>
{ description }
<div className="mx_SpaceHierarchy_roomTile_item">
<div className="mx_SpaceHierarchy_roomTile_avatar">
{ avatar }
</div>
<div className="mx_SpaceHierarchy_roomTile_name">
{ name }
{ joinedSection }
{ suggestedSection }
</div>
<div
className="mx_SpaceHierarchy_roomTile_info"
ref={e => e && linkifyElement(e)}
onClick={ev => {
// prevent clicks on links from bubbling up to the room tile
if ((ev.target as HTMLElement).tagName === "A") {
ev.stopPropagation();
}
}}
>
{ description }
</div>
</div>
<div className="mx_SpaceHierarchy_actions">
{ button }