Added animation to tooltip opening closing
This commit is contained in:
parent
d2294393b5
commit
08fe5000a7
|
@ -1,4 +1,5 @@
|
||||||
import Tippy, { TippyProps } from "@tippyjs/react";
|
import Tippy, { TippyProps } from "@tippyjs/react";
|
||||||
|
import "tippy.js/animations/scale-subtle.css";
|
||||||
|
|
||||||
interface ToolTipProps extends TippyProps {}
|
interface ToolTipProps extends TippyProps {}
|
||||||
|
|
||||||
|
@ -8,6 +9,7 @@ export default function ToolTip(props: ToolTipProps): JSX.Element {
|
||||||
// Set defaults
|
// Set defaults
|
||||||
if (newProps.delay === undefined) newProps.delay = [150, 0];
|
if (newProps.delay === undefined) newProps.delay = [150, 0];
|
||||||
if (newProps.interactive === undefined) newProps.interactive = true;
|
if (newProps.interactive === undefined) newProps.interactive = true;
|
||||||
|
if (newProps.animation === undefined) newProps.animation = "scale-subtle";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tippy {...newProps}>
|
<Tippy {...newProps}>
|
||||||
|
|
|
@ -16,7 +16,6 @@ class MyDocument extends Document {
|
||||||
return (
|
return (
|
||||||
<Html>
|
<Html>
|
||||||
<Head>
|
<Head>
|
||||||
|
|
||||||
<link
|
<link
|
||||||
rel="apple-touch-icon"
|
rel="apple-touch-icon"
|
||||||
sizes="180x180"
|
sizes="180x180"
|
||||||
|
|
Loading…
Reference in New Issue