diff --git a/app/components/Avatar/AvatarWithPresence.tsx b/app/components/Avatar/AvatarWithPresence.tsx index abd02f543..ade894f0a 100644 --- a/app/components/Avatar/AvatarWithPresence.tsx +++ b/app/components/Avatar/AvatarWithPresence.tsx @@ -34,7 +34,7 @@ function AvatarWithPresence({ return ( <> {user.name} {isCurrentUser && `(${t("You")})`} {status && ( diff --git a/app/components/ConnectionStatus.tsx b/app/components/ConnectionStatus.tsx index b09018d7d..6693602c3 100644 --- a/app/components/ConnectionStatus.tsx +++ b/app/components/ConnectionStatus.tsx @@ -42,7 +42,7 @@ function ConnectionStatus() { return ui.multiplayerStatus === "connecting" || ui.multiplayerStatus === "disconnected" ? ( {message.title} diff --git a/app/components/DocumentCard.tsx b/app/components/DocumentCard.tsx index 5da426d51..6cc2ea83f 100644 --- a/app/components/DocumentCard.tsx +++ b/app/components/DocumentCard.tsx @@ -145,7 +145,7 @@ function DocumentCard(props: Props) { {canUpdatePin && ( {!isDragging && pin && ( - + diff --git a/app/components/DocumentListItem.tsx b/app/components/DocumentListItem.tsx index 1b8862952..ba3243f76 100644 --- a/app/components/DocumentListItem.tsx +++ b/app/components/DocumentListItem.tsx @@ -107,7 +107,7 @@ function DocumentListItem( )} {document.isDraft && showDraft && ( diff --git a/app/components/LocaleTime.tsx b/app/components/LocaleTime.tsx index 4579445b4..53efa1331 100644 --- a/app/components/LocaleTime.tsx +++ b/app/components/LocaleTime.tsx @@ -79,7 +79,7 @@ const LocaleTime: React.FC = ({ }); return ( - + ); diff --git a/app/components/Notifications/Notifications.tsx b/app/components/Notifications/Notifications.tsx index 723a34d83..c3e4daee6 100644 --- a/app/components/Notifications/Notifications.tsx +++ b/app/components/Notifications/Notifications.tsx @@ -58,13 +58,13 @@ function Notifications( {notifications.approximateUnreadCount > 0 && ( - + )} - + diff --git a/app/components/Sharing/OtherAccess.tsx b/app/components/Sharing/OtherAccess.tsx index f8e6195cf..46a820575 100644 --- a/app/components/Sharing/OtherAccess.tsx +++ b/app/components/Sharing/OtherAccess.tsx @@ -83,7 +83,7 @@ export const OtherAccess = observer(({ document, children }: Props) => { image={} title={document.createdBy.name} actions={ - + {t("Can edit")} } @@ -103,7 +103,7 @@ export const OtherAccess = observer(({ document, children }: Props) => { subtitle={t("Other workspace members may have access")} actions={ @@ -117,10 +117,10 @@ export const OtherAccess = observer(({ document, children }: Props) => { const AccessTooltip = ({ children, - tooltip, + content, }: { children?: React.ReactNode; - tooltip?: string; + content?: string; }) => { const { t } = useTranslation(); @@ -129,7 +129,7 @@ const AccessTooltip = ({ {children} - + diff --git a/app/components/Sharing/PublicAccess.tsx b/app/components/Sharing/PublicAccess.tsx index 2513a4735..c546a7c3d 100644 --- a/app/components/Sharing/PublicAccess.tsx +++ b/app/components/Sharing/PublicAccess.tsx @@ -111,7 +111,7 @@ function PublicAccess({ document, share, sharedParent }: Props) { : share?.url ?? ""; const copyButton = ( - + diff --git a/app/components/Sharing/SharePopover.tsx b/app/components/Sharing/SharePopover.tsx index 0b01a3f31..f2fa3cdda 100644 --- a/app/components/Sharing/SharePopover.tsx +++ b/app/components/Sharing/SharePopover.tsx @@ -228,7 +228,7 @@ function SharePopover({ ) : null ) : ( diff --git a/app/components/Sidebar/Settings.tsx b/app/components/Sidebar/Settings.tsx index 437a1749e..af0719fcb 100644 --- a/app/components/Sidebar/Settings.tsx +++ b/app/components/Sidebar/Settings.tsx @@ -43,7 +43,7 @@ function SettingsSidebar() { onClick={returnToApp} > diff --git a/app/components/Sidebar/components/CollectionLink.tsx b/app/components/Sidebar/components/CollectionLink.tsx index c8e760854..beeb5e531 100644 --- a/app/components/Sidebar/components/CollectionLink.tsx +++ b/app/components/Sidebar/components/CollectionLink.tsx @@ -162,7 +162,7 @@ const CollectionLink: React.FC = ({ !isDraggingAnyCollection && ( {can.createChildDocument && ( - + ) { return ( - + Desktop.bridge.goBack()}> - + Desktop.bridge.goForward()}> diff --git a/app/components/Star.tsx b/app/components/Star.tsx index bbc37b0ed..11ae1a2ac 100644 --- a/app/components/Star.tsx +++ b/app/components/Star.tsx @@ -44,7 +44,7 @@ function Star({ size, document, collection, color, ...rest }: Props) { context={context} hideOnActionDisabled tooltip={{ - tooltip: target.isStarred ? t("Unstar document") : t("Star document"), + content: target.isStarred ? t("Unstar document") : t("Star document"), delay: 500, }} action={ diff --git a/app/components/Tooltip.tsx b/app/components/Tooltip.tsx index 64bf73544..cf5bf2d6b 100644 --- a/app/components/Tooltip.tsx +++ b/app/components/Tooltip.tsx @@ -6,11 +6,13 @@ import { s } from "@shared/styles"; import useMobile from "~/hooks/useMobile"; export type Props = Omit & { - tooltip?: React.ReactChild | React.ReactChild[]; + /** The content to display in the tooltip. */ + content?: React.ReactChild | React.ReactChild[]; + /** A keyboard shortcut to display next to the content */ shortcut?: React.ReactNode; }; -function Tooltip({ shortcut, tooltip, delay = 50, ...rest }: Props) { +function Tooltip({ shortcut, content: tooltip, delay = 50, ...rest }: Props) { const isMobile = useMobile(); let content = <>{tooltip}; diff --git a/app/editor/components/FindAndReplace.tsx b/app/editor/components/FindAndReplace.tsx index d9a8db77d..85bd410c9 100644 --- a/app/editor/components/FindAndReplace.tsx +++ b/app/editor/components/FindAndReplace.tsx @@ -273,7 +273,7 @@ export default function FindAndReplace({ const navigation = ( <> diff --git a/app/editor/components/LinkEditor.tsx b/app/editor/components/LinkEditor.tsx index ade26e7ee..d4807e3c3 100644 --- a/app/editor/components/LinkEditor.tsx +++ b/app/editor/components/LinkEditor.tsx @@ -334,13 +334,13 @@ class LinkEditor extends React.Component { /> {isInternal ? : } - + diff --git a/app/editor/components/ToolbarMenu.tsx b/app/editor/components/ToolbarMenu.tsx index 4adc697a7..670317994 100644 --- a/app/editor/components/ToolbarMenu.tsx +++ b/app/editor/components/ToolbarMenu.tsx @@ -93,7 +93,7 @@ function ToolbarMenu(props: Props) { return ( {item.children ? ( diff --git a/app/editor/components/Tooltip.tsx b/app/editor/components/Tooltip.tsx index 645af2eb2..9094ee8cf 100644 --- a/app/editor/components/Tooltip.tsx +++ b/app/editor/components/Tooltip.tsx @@ -3,12 +3,13 @@ import styled from "styled-components"; import Tooltip from "~/components/Tooltip"; type Props = { + /** The content to display in the tooltip. */ + content?: string; children?: React.ReactNode; - tooltip?: string; }; -const WrappedTooltip: React.FC = ({ children, tooltip }: Props) => ( - +const WrappedTooltip: React.FC = ({ children, content }: Props) => ( + {children} ); diff --git a/app/menus/NewDocumentMenu.tsx b/app/menus/NewDocumentMenu.tsx index 490f4d8c4..38890803e 100644 --- a/app/menus/NewDocumentMenu.tsx +++ b/app/menus/NewDocumentMenu.tsx @@ -20,7 +20,7 @@ function NewDocumentMenu() { return ( { context={context} action={editCollectionPermissions} tooltip={{ - tooltip: + content: usersCount > 0 ? groupsCount > 0 ? groupsCount > 1 diff --git a/app/scenes/Document/components/CommentForm.tsx b/app/scenes/Document/components/CommentForm.tsx index 89464655a..5accb27e5 100644 --- a/app/scenes/Document/components/CommentForm.tsx +++ b/app/scenes/Document/components/CommentForm.tsx @@ -302,7 +302,7 @@ function CommentForm({ {t("Cancel")} - + diff --git a/app/scenes/Document/components/Header.tsx b/app/scenes/Document/components/Header.tsx index f92de0aa1..01970ab1a 100644 --- a/app/scenes/Document/components/Header.tsx +++ b/app/scenes/Document/components/Header.tsx @@ -120,7 +120,7 @@ function DocumentHeader({ const canToggleEmbeds = team?.documentEmbeds; const toc = ( ( diff --git a/app/scenes/Document/components/KeyboardShortcutsButton.tsx b/app/scenes/Document/components/KeyboardShortcutsButton.tsx index 53fed1157..ddae8e082 100644 --- a/app/scenes/Document/components/KeyboardShortcutsButton.tsx +++ b/app/scenes/Document/components/KeyboardShortcutsButton.tsx @@ -23,7 +23,7 @@ function KeyboardShortcutsButton() { }; return ( - + diff --git a/app/scenes/Document/components/SidebarLayout.tsx b/app/scenes/Document/components/SidebarLayout.tsx index 0e909b902..3e8ec263d 100644 --- a/app/scenes/Document/components/SidebarLayout.tsx +++ b/app/scenes/Document/components/SidebarLayout.tsx @@ -32,7 +32,7 @@ function SidebarLayout({ title, onClose, children, scrollable = true }: Props) { <>
{title} - +