UNPKG

react-scroll-to-top

Version:

A lightweight and customizable button component that scrolls to the top of a page when pressed The button is only visible once a certain height has been reached on the page

14 lines (13 loc) 446 B
import React from "react"; import "./styles.css"; declare type Props = React.ComponentPropsWithoutRef<"button"> & { top?: number; smooth?: boolean; svgPath?: string; viewBox?: string; component?: any; width?: string; height?: string; }; declare const ScrollToTop: ({ top, className, color, smooth, component, viewBox, svgPath, width, height, ...props }: Props) => JSX.Element; export default ScrollToTop;