mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
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:
parent
9d04479f98
commit
faad8a65f1
14 changed files with 150 additions and 105 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue