Update react tooltip imports
[MAILPOET-5482]
This commit is contained in:
@@ -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;
|
||||||
};
|
};
|
||||||
|
@@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -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'}
|
||||||
|
@@ -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}
|
||||||
|
Reference in New Issue
Block a user