File tree Expand file tree Collapse file tree 5 files changed +34
-34
lines changed Expand file tree Collapse file tree 5 files changed +34
-34
lines changed Original file line number Diff line number Diff line change @@ -39,22 +39,20 @@ export function FooterImpl() {
39
39
40
40
< div className = { cs ( styles . settings , styles . toggleDarkModeContainer ) } >
41
41
{ hasMounted && (
42
- < a
43
- className = { styles . toggleDarkMode }
44
- href = '#'
45
- role = 'button'
46
- onClick = { onToggleDarkMode }
47
- title = 'Toggle dark mode'
48
- >
49
- { isDarkMode ? < IoMoonSharp /> : < IoSunnyOutline /> }
50
- </ a >
42
+ < button
43
+ type = "button"
44
+ className = { styles . toggleDarkMode }
45
+ onClick = { onToggleDarkMode }
46
+ title = 'Toggle dark mode'
47
+ >
48
+ { isDarkMode ? < IoMoonSharp /> : < IoSunnyOutline /> }
49
+ </ button >
51
50
) }
52
51
</ div >
53
52
< div className = { styles . social } >
54
53
< PageSocialButtons iconSize = { 32 } />
55
54
</ div >
56
55
</ div >
57
-
58
56
< div className = "SiteInfo" >
59
57
< div className = { styles . siteInfoLinks } >
60
58
{ footerLinks
Original file line number Diff line number Diff line change @@ -23,12 +23,13 @@ function ToggleThemeButton() {
23
23
} , [ toggleDarkMode ] )
24
24
25
25
return (
26
- < div
26
+ < button
27
+ type = "button"
27
28
className = { cs ( 'breadcrumb' , 'button' , ! hasMounted && styles . hidden ) }
28
29
onClick = { onToggleTheme }
29
30
>
30
31
{ hasMounted && isDarkMode ? < IoMoonSharp /> : < IoSunnyOutline /> }
31
- </ div >
32
+ </ button >
32
33
)
33
34
}
34
35
@@ -60,23 +61,22 @@ export function NotionPageHeader({
60
61
return (
61
62
< components . PageLink
62
63
href = { mapPageUrl ( link . pageId ) }
63
- key = { index }
64
+ key = { `nav- ${ link . pageId } - ${ link . title } ` }
64
65
className = { cs ( styles . navLink , 'breadcrumb' , 'button' ) }
65
66
>
66
67
{ link . title }
67
68
</ components . PageLink >
68
69
)
69
- } else {
70
- return (
71
- < components . Link
72
- href = { link . url }
73
- key = { index }
74
- className = { cs ( styles . navLink , 'breadcrumb' , 'button' ) }
75
- >
76
- { link . title }
77
- </ components . Link >
78
- )
79
70
}
71
+ return (
72
+ < components . Link
73
+ href = { link . url }
74
+ key = { `nav-${ link . url } -${ link . title } ` }
75
+ className = { cs ( styles . navLink , 'breadcrumb' , 'button' ) }
76
+ >
77
+ { link . title }
78
+ </ components . Link >
79
+ )
80
80
} )
81
81
. filter ( Boolean ) }
82
82
Original file line number Diff line number Diff line change 81
81
user-select : none;
82
82
}
83
83
84
- .settings a ,
84
+ .settings button ,
85
85
.social a {
86
86
cursor : pointer;
87
87
font-size : 2em ;
91
91
transition : color 250ms ease-out;
92
92
}
93
93
94
- .settings a : last-of-type ,
94
+ .settings button : last-of-type ,
95
95
.social a : last-of-type {
96
96
margin-right : 0 ;
97
97
}
98
98
99
- .settings a : hover ,
99
+ .settings button : hover ,
100
100
.social a : hover {
101
101
transition : color 50ms ease-out;
102
102
}
103
103
104
- .toggleDarkMode : hover {
105
- color : # 2795e9 ;
104
+ .settings button {
105
+ /* Reset default button styles */
106
+ background : none;
107
+ border : none;
106
108
}
107
109
108
110
.comments {
Original file line number Diff line number Diff line change 1
1
import ky from 'ky'
2
2
import lqip from 'lqip-modern'
3
- import {
4
- type ExtendedRecordMap ,
5
- type PreviewImage ,
6
- type PreviewImageMap
3
+ import type {
4
+ ExtendedRecordMap ,
5
+ PreviewImage ,
6
+ PreviewImageMap
7
7
} from 'notion-types'
8
8
import { getPageImageUrls , normalizeUrl } from 'notion-utils'
9
9
import pMap from 'p-map'
Original file line number Diff line number Diff line change 2
2
box-sizing : border-box;
3
3
}
4
4
5
- a {
5
+ a , button {
6
6
color : inherit;
7
7
text-decoration : none;
8
8
}
57
57
background-color : var (--fg-color-1 );
58
58
}
59
59
60
- ::-webkit-scrollbar-track {
60
+ ::-webkit-scrollbar-track {
61
61
background-color : var (--bg-color );
62
62
}
You can’t perform that action at this time.
0 commit comments