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 77 type TextStyle ,
88 type StyleProp ,
99 StyleSheet ,
10+ type ScrollViewProps ,
1011} from "react-native" ;
1112import SyntaxHighlighter , {
1213 type SyntaxHighlighterProps ,
@@ -22,13 +23,15 @@ export interface CodeHighlighterProps extends SyntaxHighlighterProps {
2223 hljsStyle : ReactStyle ;
2324 containerStyle ?: StyleProp < ViewStyle > ;
2425 textStyle ?: StyleProp < TextStyle > ;
26+ scrollViewProps ?: ScrollViewProps ;
2527}
2628
2729export const CodeHighlighter : FunctionComponent < CodeHighlighterProps > = ( {
2830 children,
2931 containerStyle,
3032 textStyle,
3133 hljsStyle,
34+ scrollViewProps,
3235 ...rest
3336} ) => {
3437 const stylesheet : HighlighterStyleSheet = useMemo (
@@ -70,6 +73,7 @@ export const CodeHighlighter: FunctionComponent<CodeHighlighterProps> = ({
7073 const { rows } = props ;
7174 return (
7275 < ScrollView
76+ { ...scrollViewProps }
7377 horizontal
7478 contentContainerStyle = { [ stylesheet . hljs , containerStyle ] }
7579 >
You can’t perform that action at this time.
0 commit comments