Skip to content

Commit 724a17a

Browse files
committed
replace SyntaxHighlighter with Prism import
1 parent 5c069fc commit 724a17a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/example-src-files/CodeSnippet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Animated, {
1313
useSharedValue,
1414
withTiming,
1515
} from 'react-native-reanimated';
16-
import SyntaxHighlighter from 'react-native-syntax-highlighter';
16+
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
1717
import { ghcolors, tomorrow } from 'react-syntax-highlighter/dist/esm/styles/prism';
1818

1919
const styles = StyleSheet.create({
@@ -74,7 +74,7 @@ export default function CodeSnippet({ code }: CodeSnippetProps): JSX.Element {
7474
</Pressable>
7575
<Animated.View style={animatedStyle}>
7676
<View onLayout={onLayout} style={styles.codeContainer}>
77-
<SyntaxHighlighter language='jsx' style={syntaxStyle} highlighter={"prism"}>
77+
<SyntaxHighlighter language='jsx' style={syntaxStyle}>
7878
{code}
7979
</SyntaxHighlighter>
8080
</View>

0 commit comments

Comments
 (0)