Add embed mode

2db23e4110
from postmessage_ptt branch done in a slightly nicer way
This commit is contained in:
David Baker
2022-06-28 15:08:14 +01:00
parent 5ced94755b
commit 7dc6fb27ea
4 changed files with 24 additions and 4 deletions

View File

@@ -77,9 +77,23 @@ export function RoomHeaderInfo({ roomName, avatarUrl }) {
);
}
export function RoomSetupHeaderInfo({ roomName, avatarUrl, ...rest }) {
export function RoomSetupHeaderInfo({
roomName,
avatarUrl,
isEmbedded,
...rest
}) {
const ref = useRef();
const { buttonProps } = useButton(rest, ref);
if (isEmbedded) {
return (
<div className={styles.backButton} ref={ref} {...buttonProps}>
<RoomHeaderInfo roomName={roomName} avatarUrl={avatarUrl} />
</div>
);
}
return (
<button className={styles.backButton} ref={ref} {...buttonProps}>
<ArrowLeftIcon width={16} height={16} />