diff --git a/src/components/scroll-to-top/scroll-to-top.tsx b/src/components/scroll-to-top/scroll-to-top.tsx index 1781282..9f67244 100644 --- a/src/components/scroll-to-top/scroll-to-top.tsx +++ b/src/components/scroll-to-top/scroll-to-top.tsx @@ -2,6 +2,7 @@ import { useState, useEffect } from 'react'; import { BiUpArrowAlt } from 'react-icons/bi/index'; import { motion, AnimatePresence } from 'framer-motion'; +import { Tooltip } from '@/components/tooltip'; import { mix, fade, slideY } from '@/lib/motion'; import styles from './scroll-to-top.module.css'; @@ -32,17 +33,19 @@ export function ScrollToTop() { return ( {isVisible && ( - - - + + + + + )} ); diff --git a/src/components/tooltip/tooltip.tsx b/src/components/tooltip/tooltip.tsx index 56e743a..c6fb0a9 100644 --- a/src/components/tooltip/tooltip.tsx +++ b/src/components/tooltip/tooltip.tsx @@ -41,7 +41,7 @@ export function Tooltip({ placement: computedPlacement, refs, } = useFloating({ - middleware: [offset(12), flip(), shift()], + middleware: [offset(12), flip(), shift({ padding: 8 })], onOpenChange: setIsTooltipOpen, open: isTooltipOpen, placement: placement,