Commit graph

5 commits

Author SHA1 Message Date
Alexey Pyltsyn
c935fe2a37
feat(v2): add back to top button (#4912)
* feat(v2): add back to top button

* Test on mobiles

* Use clean-btn class

* Fix case

* clearer useScrollPosition() hook

* fix useScrollPosition typing + dangerous 0 fallback value + refactor a bit backToTop button

* useless fallback

* Handle both browsers with/without native smooth scrollBehavior support

* fix SupportsNativeSmoothScrolling using document on SSR

* revert to smoothScrollTopPolyfill usage

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-28 22:10:17 +02:00
Armano
f12e8b596d
perf(v2): reduce amount of navbar renders while scrolling (#4473) 2021-03-22 19:32:11 +01:00
Alexey Pyltsyn
61fd53f7c0
fix(v2): increase stability of hideable navbar (#3733)
* fix

* fix(v2): increase stability of hideable navbar

* Fix bug after reload

* Remove state for hash
2020-11-18 16:17:04 +01:00
Sam Zhou
bd9b6618c1
feat(v2): Provide typing to most of the theme-classic components (#3348)
* feat(v2): Provide typing to most of the theme-classic components

* Expose type to the end users and dogfood it in v2 website
2020-08-28 12:06:37 +02:00
Sam Zhou
5ccd24cc1f
feat(v2): Support swizzling TypeScript components (#2671)
* feat(v2): Support swizzling TypeScript components

* Add tsc --noEmit to tsc script in theme-classic

Now everything can pass the type checker! (although still a lot of any)

* Add tsconfig and types.d.ts to website

Improve developer experience.

As an example, I converted NotFound to tsx

* Apply type annotation suggestions

* Do not fallback to `getThemePath` if getTypeScriptThemePath is undefined

* Fix tsc

* Add module declaration for @theme-original/*

* Move babel cli to root package.json
2020-06-25 16:07:30 +02:00
Renamed from packages/docusaurus-theme-classic/src/theme/hooks/useScrollPosition.js (Browse further)