New source found from dndbeyond.com
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import * as React from "react";
|
||||
import { MouseEvent, Component, PropsWithChildren } from "react";
|
||||
import Tippy from "tippy.js";
|
||||
|
||||
export interface TippyOpts {
|
||||
@@ -10,7 +10,7 @@ export interface TippyOpts {
|
||||
placement?: string;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
interface Props extends PropsWithChildren {
|
||||
tippyOpts?: TippyOpts;
|
||||
className: string;
|
||||
title: string;
|
||||
@@ -28,7 +28,7 @@ const defaultTippsOpts: TippyOpts = {
|
||||
duration: [250, 250],
|
||||
};
|
||||
|
||||
export default class Tooltip extends React.Component<Props> {
|
||||
export default class Tooltip extends Component<Props> {
|
||||
static defaultProps = {
|
||||
style: {},
|
||||
isInteractive: false,
|
||||
@@ -108,7 +108,7 @@ export default class Tooltip extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
handleClick = (evt: React.MouseEvent): void => {
|
||||
handleClick = (evt: MouseEvent): void => {
|
||||
const { onClick } = this.props;
|
||||
|
||||
if (onClick) {
|
||||
@@ -142,7 +142,7 @@ export default class Tooltip extends React.Component<Props> {
|
||||
}
|
||||
|
||||
if (!enabled) {
|
||||
return <React.Fragment>{children}</React.Fragment>;
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user