Skip to content

Commit

Permalink
feat: uptoscroll
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main.ts
  • Loading branch information
say8425 committed Apr 5, 2024
1 parent 7876f52 commit 329144d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { upToScroll } from "./upToScroll";
8 changes: 8 additions & 0 deletions src/upToScroll/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const upToScroll = (scrollTo: number) => {
return () => {
window.scrollTo({
top: scrollTo,
behavior: "smooth",
});
};
};

0 comments on commit 329144d

Please sign in to comment.