File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 7
7
type TextStyle ,
8
8
type StyleProp ,
9
9
StyleSheet ,
10
+ type ScrollViewProps ,
10
11
} from "react-native" ;
11
12
import SyntaxHighlighter , {
12
13
type SyntaxHighlighterProps ,
@@ -22,13 +23,15 @@ export interface CodeHighlighterProps extends SyntaxHighlighterProps {
22
23
hljsStyle : ReactStyle ;
23
24
containerStyle ?: StyleProp < ViewStyle > ;
24
25
textStyle ?: StyleProp < TextStyle > ;
26
+ scrollViewProps ?: ScrollViewProps ;
25
27
}
26
28
27
29
export const CodeHighlighter : FunctionComponent < CodeHighlighterProps > = ( {
28
30
children,
29
31
containerStyle,
30
32
textStyle,
31
33
hljsStyle,
34
+ scrollViewProps,
32
35
...rest
33
36
} ) => {
34
37
const stylesheet : HighlighterStyleSheet = useMemo (
@@ -70,6 +73,7 @@ export const CodeHighlighter: FunctionComponent<CodeHighlighterProps> = ({
70
73
const { rows } = props ;
71
74
return (
72
75
< ScrollView
76
+ { ...scrollViewProps }
73
77
horizontal
74
78
contentContainerStyle = { [ stylesheet . hljs , containerStyle ] }
75
79
>
You can’t perform that action at this time.
0 commit comments