react-scroll-into-view
Version:
Simple React element that when clicked scrolls to any element on page
27 lines (26 loc) • 651 B
text/typescript
import React from "react";
//#region src/index.d.ts
type ClickHandler = (ev: React.MouseEvent<HTMLElement>) => void;
type ScrollIntoViewProps = {
selector: string;
children: React.ReactNode;
smooth?: boolean;
style?: React.CSSProperties;
alignToTop?: boolean;
className?: string;
scrollOptions?: ScrollIntoViewOptions;
onClick?: ClickHandler;
};
declare const ScrollInto: ({
children,
selector,
smooth,
style,
alignToTop,
className,
onClick,
scrollOptions
}: ScrollIntoViewProps) => React.JSX.Element;
//#endregion
export { ScrollInto, ScrollInto as default, ScrollIntoViewProps };
//# sourceMappingURL=index.d.mts.map