Update react tooltip imports

[MAILPOET-5482]
This commit is contained in:
Pavel Dohnal
2024-06-21 11:07:34 +02:00
committed by Veljko V
parent 9f8fdfb85f
commit d00d72ea14
4 changed files with 7 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import { ReactNode } from 'react';
import { Place } from 'react-tooltip';
import { PlacesType } from 'react-tooltip';
import { Tag } from '../../tag';
import { Tooltip } from '../../tooltip/tooltip';
@@ -7,7 +7,7 @@ type BadgeProps = {
name: string;
tooltip?: string | ReactNode;
tooltipId?: string;
tooltipPlace?: Place;
tooltipPlace?: PlacesType;
type?: 'average' | 'good' | 'excellent' | 'critical' | 'unknown';
isInverted?: boolean;
};

View File

@@ -1,12 +1,12 @@
import { __, _x } from '@wordpress/i18n';
import { Place } from 'react-tooltip';
import { PlacesType } from 'react-tooltip';
import { Badge } from './badge';
type StatsBadgeProps = {
stat: string;
rate: number;
tooltipId?: string;
tooltipPlace?: Place;
tooltipPlace?: PlacesType;
isInverted?: boolean;
};

View File

@@ -1,5 +1,5 @@
import classnames from 'classnames';
import ReactTooltip, { TooltipProps } from 'react-tooltip';
import { Tooltip as ReactTooltip, ITooltip } from 'react-tooltip';
export function Tooltip({
effect,
@@ -10,7 +10,7 @@ export function Tooltip({
className,
children,
...props
}: TooltipProps) {
}: ITooltip) {
return (
<ReactTooltip
effect={effect || 'solid'}

View File

@@ -1,5 +1,5 @@
import PropTypes from 'prop-types';
import ReactTooltip from 'react-tooltip';
import { Tooltip as ReactTooltip } from 'react-tooltip';
import ReactHtmlParser from 'react-html-parser';
function Tooltip(props) {
@@ -40,7 +40,6 @@ function Tooltip(props) {
className="mailpoet-tooltip-message"
multiline
id={tooltipId}
efect="solid"
place={props.place}
>
{tooltip}