-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): side menu sticky on desktop + mobile (#988)
* fix(docs): update menu to be fixed position * fix(docs): update menu to be fixed position for landing page layout with initial scroll * fix(docs): side menu position reset when user navigates * fix(docs): mobile menu view scroll fix * chore: fix lint warnings + remove scrollto helper * chore: empty changeset for docs menu ui fixes * fix(docs): update chain web description * fix(docs): update chain web description * chore: revert single quote from chainweb doc page * chore: move styles to sprinkles
- Loading branch information
1 parent
3fba752
commit 3b72555
Showing
10 changed files
with
308 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
|
||
export function useWindowScroll(): [ | ||
{ | ||
x: number; | ||
y: number; | ||
}, | ||
] { | ||
const [state, setState] = React.useState({ | ||
x: 0, | ||
y: 0, | ||
}); | ||
|
||
React.useLayoutEffect((): (() => void) => { | ||
const handleScroll = (): void => { | ||
setState({ x: window.scrollX, y: window.scrollY }); | ||
}; | ||
|
||
handleScroll(); | ||
window.addEventListener('scroll', handleScroll); | ||
|
||
return () => { | ||
window.removeEventListener('scroll', handleScroll); | ||
}; | ||
}, []); | ||
|
||
return [state]; | ||
} |
Oops, something went wrong.
3b72555
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
alpha-docs – ./packages/apps/docs
alpha-docs.kadena.io
alpha-docs-kadena-js.vercel.app
alpha-docs-git-main-kadena-js.vercel.app
docs-silk-two.vercel.app
3b72555
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs-storybook – ./packages/apps/docs
docs-storybook-kadena-js.vercel.app
kadena-js-docs.vercel.app
docs-storybook-git-main-kadena-js.vercel.app