@@ -13,7 +13,6 @@ import VersionDropdown from '../VersionDropdown';
13
13
import useStickyTopValues from '../../hooks/useStickyTopValues' ;
14
14
import { theme } from '../../theme/docsTheme' ;
15
15
import { formatText } from '../../utils/format-text' ;
16
- import { baseUrl } from '../../utils/base-url' ;
17
16
import { TocContext } from '../../context/toc-context' ;
18
17
import { VersionContext } from '../../context/version-context' ;
19
18
import useSnootyMetadata from '../../utils/use-snooty-metadata' ;
@@ -26,7 +25,8 @@ import ProductsList from './ProductsList';
26
25
import { SidenavContext } from './sidenav-context' ;
27
26
import SidenavMobileTransition from './SidenavMobileTransition' ;
28
27
import Toctree from './Toctree' ;
29
- import { sideNavItemBasePadding , sideNavItemFontSize } from './styles/sideNavItem' ;
28
+ import { sideNavItemBasePadding , sideNavItemFontSize , titleStyle } from './styles/sideNavItem' ;
29
+ import DocsHomeButton from './DocsHomeButton' ;
30
30
31
31
const SIDENAV_WIDTH = 268 ;
32
32
@@ -76,34 +76,6 @@ const sideNavStyling = ({ hideMobile, isCollapsed }) => LeafyCSS`
76
76
77
77
` ;
78
78
79
- const titleStyle = LeafyCSS `
80
- color : ${ palette . gray . dark3 } ;
81
- font-size : ${ theme . fontSize . small } ;
82
- font-weight : bold;
83
- line-height : 20px ;
84
- text-transform : none;
85
- : hover {
86
- background-color : inherit;
87
-
88
- & : after , span : after {
89
- display : none;
90
- }
91
- }
92
- ` ;
93
-
94
- const homeLinkStyle = LeafyCSS `
95
- span {
96
- color : ${ palette . gray . dark1 } ;
97
- font-weight : 400 ;
98
- display : flex;
99
- gap : 6px ;
100
- align-items : center;
101
- svg {
102
- color : ${ palette . gray . dark2 }
103
- }
104
- }
105
- ` ;
106
-
107
79
// Prevent content scrolling when the side nav is open on mobile and tablet screen sizes
108
80
const disableScroll = ( shouldDisableScroll ) => css `
109
81
body {
@@ -272,10 +244,7 @@ const Sidenav = ({ chapters, guides, page, pageTitle, repoBranches, siteTitle, s
272
244
< IATransition back = { back } hasIA = { ! ! ia } slug = { slug } isMobile = { isMobile } >
273
245
< NavTopContainer >
274
246
< ArtificialPadding />
275
- < SideNavItem className = { cx ( titleStyle , sideNavItemBasePadding , homeLinkStyle ) } as = { Link } to = { baseUrl ( ) } >
276
- < Icon glyph = "Home" > </ Icon >
277
- Docs Home
278
- </ SideNavItem >
247
+ < DocsHomeButton />
279
248
< Border />
280
249
{ ia && (
281
250
< IA
0 commit comments