diff --git a/src/webapp/components/navigation/scrollToTop/ScrollToTop.tsx b/src/webapp/components/navigation/scrollToTop/ScrollToTop.tsx new file mode 100644 index 00000000..e1e88ab4 --- /dev/null +++ b/src/webapp/components/navigation/scrollToTop/ScrollToTop.tsx @@ -0,0 +1,31 @@ +'use client'; + +import { useWindowScroll } from '@mantine/hooks'; +import { ActionIcon, Transition } from '@mantine/core'; +import { FaArrowUp } from 'react-icons/fa6'; + +export default function ScrollToTop() { + const [scroll, scrollTo] = useWindowScroll(); + + return ( + 100}> + {(transitionStyles) => ( + scrollTo({ y: 0 })} + style={{ ...transitionStyles, zIndex: 102 }} + radius={'xl'} + variant="outline" + size={'xl'} + bg="white" + color={'gray'} + m="sm" + pos={'fixed'} + bottom={0} + left={0} + > + + + )} + + ); +}