Added animation to tooltip opening closing

This commit is contained in:
DrMint 2022-03-13 15:34:51 +01:00
parent d2294393b5
commit 08fe5000a7
3 changed files with 7 additions and 6 deletions

10
next-env.d.ts vendored
View File

@ -1,5 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@ -1,4 +1,5 @@
import Tippy, { TippyProps } from "@tippyjs/react";
import "tippy.js/animations/scale-subtle.css";
interface ToolTipProps extends TippyProps {}
@ -8,6 +9,7 @@ export default function ToolTip(props: ToolTipProps): JSX.Element {
// Set defaults
if (newProps.delay === undefined) newProps.delay = [150, 0];
if (newProps.interactive === undefined) newProps.interactive = true;
if (newProps.animation === undefined) newProps.animation = "scale-subtle";
return (
<Tippy {...newProps}>

View File

@ -16,7 +16,6 @@ class MyDocument extends Document {
return (
<Html>
<Head>
<link
rel="apple-touch-icon"
sizes="180x180"