chore: Rename tooltip.tooltip prop to tooltip.content

This commit is contained in:
Tom Moor
2024-02-03 16:22:51 -05:00
parent 0726445135
commit c3b515f0e1
32 changed files with 55 additions and 52 deletions

View File

@@ -161,7 +161,7 @@ function CollectionScene() {
{collection.name}
{collection.isPrivate && (
<Tooltip
tooltip={t(
content={t(
"This collection is only visible to those given access"
)}
placement="bottom"

View File

@@ -25,7 +25,7 @@ function Actions({ collection }: Props) {
<>
<Action>
<Tooltip
tooltip={t("New document")}
content={t("New document")}
shortcut="n"
delay={500}
placement="bottom"

View File

@@ -74,7 +74,7 @@ const MembershipPreview = ({ collection, limit = 8 }: Props) => {
context={context}
action={editCollectionPermissions}
tooltip={{
tooltip:
content:
usersCount > 0
? groupsCount > 0
? groupsCount > 1

View File

@@ -302,7 +302,7 @@ function CommentForm({
{t("Cancel")}
</ButtonSmall>
</Flex>
<Tooltip delay={500} tooltip={t("Upload image")} placement="top">
<Tooltip delay={500} content={t("Upload image")} placement="top">
<NudeButton onClick={handleImageUpload}>
<ImageIcon color={theme.textTertiary} />
</NudeButton>

View File

@@ -120,7 +120,7 @@ function DocumentHeader({
const canToggleEmbeds = team?.documentEmbeds;
const toc = (
<Tooltip
tooltip={ui.tocVisible ? t("Hide contents") : t("Show contents")}
content={ui.tocVisible ? t("Hide contents") : t("Show contents")}
shortcut="ctrl+alt+h"
delay={250}
placement="bottom"
@@ -138,7 +138,7 @@ function DocumentHeader({
const editAction = (
<Action>
<Tooltip
tooltip={t("Edit {{noun}}", {
content={t("Edit {{noun}}", {
noun: document.noun,
})}
shortcut="e"
@@ -159,7 +159,7 @@ function DocumentHeader({
const appearanceAction = (
<Action>
<Tooltip
tooltip={
content={
resolvedTheme === "light" ? t("Switch to dark") : t("Switch to light")
}
delay={500}
@@ -265,7 +265,7 @@ function DocumentHeader({
{(isEditing || isTemplate) && (
<Action>
<Tooltip
tooltip={t("Save")}
content={t("Save")}
shortcut={`${metaDisplay}+enter`}
delay={500}
placement="bottom"
@@ -297,7 +297,7 @@ function DocumentHeader({
document={document}
label={(props) => (
<Tooltip
tooltip={t("New document")}
content={t("New document")}
shortcut="n"
delay={500}
placement="bottom"
@@ -313,7 +313,7 @@ function DocumentHeader({
{revision && revision.createdAt !== document.updatedAt && (
<Action>
<Tooltip
tooltip={t("Restore version")}
content={t("Restore version")}
delay={500}
placement="bottom"
>

View File

@@ -23,7 +23,7 @@ function KeyboardShortcutsButton() {
};
return (
<Tooltip tooltip={t("Keyboard shortcuts")} shortcut="?" delay={500}>
<Tooltip content={t("Keyboard shortcuts")} shortcut="?" delay={500}>
<Button onClick={handleOpenKeyboardShortcuts} $hidden={isEditingFocus}>
<KeyboardIcon />
</Button>

View File

@@ -32,7 +32,7 @@ function SidebarLayout({ title, onClose, children, scrollable = true }: Props) {
<>
<Header>
<Title>{title}</Title>
<Tooltip tooltip={t("Close")} shortcut="Esc" delay={500}>
<Tooltip content={t("Close")} shortcut="Esc" delay={500}>
<Button
icon={<ForwardIcon />}
onClick={onClose}

View File

@@ -141,7 +141,7 @@ function Invite({ onSubmit }: Props) {
<span>
<Trans>Invited members will receive access to</Trans>{" "}
<Tooltip
tooltip={
content={
<>
{collections.nonPrivate.map((collection) => (
<li key={collection.id}>{collection.name}</li>
@@ -244,7 +244,7 @@ function Invite({ onSubmit }: Props) {
/>
{index !== 0 && (
<Remove>
<Tooltip tooltip={t("Remove invite")} placement="top">
<Tooltip content={t("Remove invite")} placement="top">
<NudeButton onClick={(ev) => handleRemove(ev, index)}>
<CloseIcon />
</NudeButton>

View File

@@ -52,7 +52,7 @@ function RecentSearches(
{...compositeProps}
>
{searchQuery.query}
<Tooltip tooltip={t("Remove search")} delay={150}>
<Tooltip content={t("Remove search")} delay={150}>
<RemoveButton
aria-label={t("Remove search")}
onClick={async (ev) => {

View File

@@ -98,7 +98,7 @@ function DomainManagement({ onSuccess }: Props) {
onChange={createOnDomainChangedHandler(index)}
/>
<Remove>
<Tooltip tooltip={t("Remove domain")} placement="top">
<Tooltip content={t("Remove domain")} placement="top">
<NudeButton onClick={() => handleRemoveDomain(index)}>
<CloseIcon />
</NudeButton>

View File

@@ -70,7 +70,7 @@ function SharesTable({ canManage, data, ...rest }: Props) {
Cell: observer(({ value }: { value: string }) =>
value ? (
<Flex align="center">
<Tooltip tooltip={t("Nested documents are publicly available")}>
<Tooltip content={t("Nested documents are publicly available")}>
<CheckmarkIcon color={theme.accent} />
</Tooltip>
</Flex>