Fix call tile copy button
This commit is contained in:
parent
c5728b2f66
commit
10f1446415
3 changed files with 34 additions and 18 deletions
|
@ -28,24 +28,27 @@ export function CallList({ title, rooms }) {
|
||||||
|
|
||||||
function CallTile({ name, avatarUrl, roomId, participants }) {
|
function CallTile({ name, avatarUrl, roomId, participants }) {
|
||||||
return (
|
return (
|
||||||
<Link to={`/room/${roomId}`} className={styles.callTile}>
|
<div className={styles.callTile}>
|
||||||
<Avatar
|
<Link to={`/room/${roomId}`} className={styles.callTileLink}>
|
||||||
size="md"
|
<Avatar
|
||||||
bgKey={name}
|
size="md"
|
||||||
src={avatarUrl}
|
bgKey={name}
|
||||||
fallback={<VideoIcon width={16} height={16} />}
|
src={avatarUrl}
|
||||||
className={styles.avatar}
|
fallback={<VideoIcon width={16} height={16} />}
|
||||||
/>
|
className={styles.avatar}
|
||||||
<div className={styles.callInfo}>
|
/>
|
||||||
<h5>{name}</h5>
|
<div className={styles.callInfo}>
|
||||||
<p>{roomId}</p>
|
<h5>{name}</h5>
|
||||||
{participants && <Facepile participants={participants} />}
|
<p>{roomId}</p>
|
||||||
</div>
|
{participants && <Facepile participants={participants} />}
|
||||||
|
</div>
|
||||||
|
<div className={styles.copyButtonSpacer} />
|
||||||
|
</Link>
|
||||||
<CopyButton
|
<CopyButton
|
||||||
className={styles.copyButton}
|
className={styles.copyButton}
|
||||||
variant="icon"
|
variant="icon"
|
||||||
value={getRoomUrl(roomId)}
|
value={getRoomUrl(roomId)}
|
||||||
/>
|
/>
|
||||||
</Link>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,23 @@
|
||||||
.callTile {
|
.callTile {
|
||||||
display: flex;
|
|
||||||
min-width: 240px;
|
min-width: 240px;
|
||||||
height: 94px;
|
height: 94px;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
text-decoration: none;
|
|
||||||
background-color: var(--bgColor2);
|
background-color: var(--bgColor2);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callTileLink {
|
||||||
|
display: flex;
|
||||||
|
text-decoration: none;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar,
|
.avatar,
|
||||||
.copyButton {
|
.copyButtonSpacer {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,11 +55,18 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.copyButtonSpacer,
|
||||||
.copyButton {
|
.copyButton {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.copyButton {
|
||||||
|
position: absolute;
|
||||||
|
top: 12px;
|
||||||
|
right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.callList {
|
.callList {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React from "react";
|
import React, { useCallback } from "react";
|
||||||
import useClipboard from "react-use-clipboard";
|
import useClipboard from "react-use-clipboard";
|
||||||
import { ReactComponent as CheckIcon } from "../icons/Check.svg";
|
import { ReactComponent as CheckIcon } from "../icons/Check.svg";
|
||||||
import { ReactComponent as CopyIcon } from "../icons/Copy.svg";
|
import { ReactComponent as CopyIcon } from "../icons/Copy.svg";
|
||||||
|
|
Loading…
Add table
Reference in a new issue