Added animation to tooltip opening closing
This commit is contained in:
parent
d2294393b5
commit
08fe5000a7
|
@ -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.
|
||||
|
|
|
@ -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}>
|
||||
|
|
|
@ -16,7 +16,6 @@ class MyDocument extends Document {
|
|||
return (
|
||||
<Html>
|
||||
<Head>
|
||||
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="180x180"
|
||||
|
|
Loading…
Reference in New Issue