File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed
Expand file tree Collapse file tree 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) {
2424 < Swap
2525 match = { [
2626 [
27- "screen and (min-width: 768px)" ,
27+ props . codeConfig . staticMediaQuery ,
2828 < DynamicScrollycoding { ...props } /> ,
2929 ] ,
3030 [ "default" , < StaticScrollycoding { ...props } /> ] ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export type CodeHikeConfig = {
55 skipLanguages : string [ ]
66 showExpandButton ?: boolean
77 showCopyButton ?: boolean
8+ staticMediaQuery ?: string
89 // path to the current file, internal use only
910 filepath ?: string
1011}
@@ -19,6 +20,7 @@ export function addConfigDefaults(
1920) : CodeHikeConfig {
2021 // TODO warn when config looks weird
2122 return {
23+ staticMediaQuery : "screen and (min-width: 768px)" ,
2224 ...config ,
2325 theme : config ?. theme || { } ,
2426 autoImport : config ?. autoImport === false ? false : true ,
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export type CodeConfig = {
4646 lineNumbers ?: boolean
4747 showCopyButton ?: boolean
4848 showExpandButton ?: boolean
49+ staticMediaQuery ?: string
4950 debug ?: boolean
5051}
5152
You can’t perform that action at this time.
0 commit comments