chore: Rename tooltip.tooltip prop to tooltip.content
This commit is contained in:
@@ -273,7 +273,7 @@ export default function FindAndReplace({
|
||||
const navigation = (
|
||||
<>
|
||||
<Tooltip
|
||||
tooltip={t("Previous match")}
|
||||
content={t("Previous match")}
|
||||
shortcut="shift+enter"
|
||||
delay={500}
|
||||
placement="bottom"
|
||||
@@ -283,7 +283,7 @@ export default function FindAndReplace({
|
||||
</ButtonLarge>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
tooltip={t("Next match")}
|
||||
content={t("Next match")}
|
||||
shortcut="enter"
|
||||
delay={500}
|
||||
placement="bottom"
|
||||
@@ -317,7 +317,7 @@ export default function FindAndReplace({
|
||||
>
|
||||
<SearchModifiers gap={8}>
|
||||
<Tooltip
|
||||
tooltip={t("Match case")}
|
||||
content={t("Match case")}
|
||||
shortcut={`${altDisplay}+${metaDisplay}+c`}
|
||||
delay={500}
|
||||
placement="bottom"
|
||||
@@ -329,7 +329,7 @@ export default function FindAndReplace({
|
||||
</ButtonSmall>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
tooltip={t("Enable regex")}
|
||||
content={t("Enable regex")}
|
||||
shortcut={`${altDisplay}+${metaDisplay}+r`}
|
||||
delay={500}
|
||||
placement="bottom"
|
||||
@@ -345,7 +345,7 @@ export default function FindAndReplace({
|
||||
{navigation}
|
||||
{!readOnly && (
|
||||
<Tooltip
|
||||
tooltip={t("Replace options")}
|
||||
content={t("Replace options")}
|
||||
delay={500}
|
||||
placement="bottom"
|
||||
>
|
||||
|
||||
@@ -334,13 +334,13 @@ class LinkEditor extends React.Component<Props, State> {
|
||||
/>
|
||||
|
||||
<Tooltip
|
||||
tooltip={isInternal ? dictionary.goToLink : dictionary.openLink}
|
||||
content={isInternal ? dictionary.goToLink : dictionary.openLink}
|
||||
>
|
||||
<ToolbarButton onClick={this.handleOpenLink} disabled={!value}>
|
||||
{isInternal ? <ArrowIcon /> : <OpenIcon />}
|
||||
</ToolbarButton>
|
||||
</Tooltip>
|
||||
<Tooltip tooltip={dictionary.removeLink}>
|
||||
<Tooltip content={dictionary.removeLink}>
|
||||
<ToolbarButton onClick={this.handleRemoveLink}>
|
||||
<CloseIcon />
|
||||
</ToolbarButton>
|
||||
|
||||
@@ -93,7 +93,7 @@ function ToolbarMenu(props: Props) {
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
tooltip={item.label === item.tooltip ? undefined : item.tooltip}
|
||||
content={item.label === item.tooltip ? undefined : item.tooltip}
|
||||
key={index}
|
||||
>
|
||||
{item.children ? (
|
||||
|
||||
@@ -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<Props> = ({ children, tooltip }: Props) => (
|
||||
<Tooltip offset={[0, 16]} delay={150} tooltip={tooltip} placement="top">
|
||||
const WrappedTooltip: React.FC<Props> = ({ children, content }: Props) => (
|
||||
<Tooltip offset={[0, 16]} delay={150} content={content} placement="top">
|
||||
<TooltipContent>{children}</TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user