feat: new Live Collaboration Component API (#6104)

* feat: new Live Collaboration Component API

* namespace export icons into `icons` dictionary and lowercase

* update readme and changelog

* review fixes

* fix

* fix

* update docs

* remove

* allow button rest props

* update docs

* docs

* add `WelcomeScreen.Center.MenuItemLiveCollaborationTrigger`

* fix lint

* update changelog

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Aakansha Doshi 2023-01-12 23:28:57 +05:30 committed by GitHub
parent 9d04479f98
commit faad8a65f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 150 additions and 105 deletions

View file

@ -1,4 +1,3 @@
import clsx from "clsx";
import { getShortcutFromShortcutName } from "../../actions/shortcuts";
import { t } from "../../i18n";
import {
@ -15,7 +14,7 @@ import {
save,
SunIcon,
TrashIcon,
UsersIcon,
usersIcon,
} from "../icons";
import { GithubIcon, DiscordIcon, TwitterIcon } from "../icons";
import DropdownMenuItem from "../dropdownMenu/DropdownMenuItem";
@ -31,6 +30,7 @@ import {
import "./DefaultItems.scss";
import { useState } from "react";
import ConfirmDialog from "../ConfirmDialog";
import clsx from "clsx";
export const LoadScene = () => {
// FIXME Hack until we tie "t" to lang state
@ -258,7 +258,7 @@ export const Socials = () => (
);
Socials.displayName = "Socials";
export const LiveCollaboration = ({
export const LiveCollaborationTrigger = ({
onSelect,
isCollaborating,
}: {
@ -271,7 +271,7 @@ export const LiveCollaboration = ({
return (
<DropdownMenuItem
data-testid="collab-button"
icon={UsersIcon}
icon={usersIcon}
className={clsx({
"active-collab": isCollaborating,
})}
@ -282,4 +282,4 @@ export const LiveCollaboration = ({
);
};
LiveCollaboration.displayName = "LiveCollaboration";
LiveCollaborationTrigger.displayName = "LiveCollaborationTrigger";