File tree 3 files changed +4
-1
lines changed 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export function Scrollycoding(props) {
24
24
< Swap
25
25
match = { [
26
26
[
27
- "screen and (min-width: 768px)" ,
27
+ props . codeConfig . staticMediaQuery ,
28
28
< DynamicScrollycoding { ...props } /> ,
29
29
] ,
30
30
[ "default" , < StaticScrollycoding { ...props } /> ] ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export type CodeHikeConfig = {
5
5
skipLanguages : string [ ]
6
6
showExpandButton ?: boolean
7
7
showCopyButton ?: boolean
8
+ staticMediaQuery ?: string
8
9
// path to the current file, internal use only
9
10
filepath ?: string
10
11
}
@@ -19,6 +20,7 @@ export function addConfigDefaults(
19
20
) : CodeHikeConfig {
20
21
// TODO warn when config looks weird
21
22
return {
23
+ staticMediaQuery : "screen and (min-width: 768px)" ,
22
24
...config ,
23
25
theme : config ?. theme || { } ,
24
26
autoImport : config ?. autoImport === false ? false : true ,
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export type CodeConfig = {
46
46
lineNumbers ?: boolean
47
47
showCopyButton ?: boolean
48
48
showExpandButton ?: boolean
49
+ staticMediaQuery ?: string
49
50
debug ?: boolean
50
51
}
51
52
You can’t perform that action at this time.
0 commit comments