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

View File

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

View File

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

View File

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