Skip to content

Commit a8e6402

Browse files
committed
chore: update example app
1 parent cf04bff commit a8e6402

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

example/src/App.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as React from "react";
22
import { StyleSheet } from "react-native";
3-
import { SafeAreaView } from "react-native-safe-area-context";
43
import CodeHighlighter from "react-native-code-highlighter";
5-
import { darcula as hljsStyle } from "react-syntax-highlighter/dist/esm/styles/hljs";
4+
import { atomOneDarkReasonable as hljsStyle } from "react-syntax-highlighter/dist/esm/styles/hljs";
65

76
const CODE_STR = `
87
import * as React from "react";
@@ -35,21 +34,23 @@ import {
3534

3635
export default function App() {
3736
return (
38-
<SafeAreaView>
39-
<CodeHighlighter
40-
containerStyle={styles.codeContainer}
41-
hljsStyle={hljsStyle}
42-
language="typescript"
43-
>
44-
{CODE_STR}
45-
</CodeHighlighter>
46-
</SafeAreaView>
37+
<CodeHighlighter
38+
containerStyle={styles.codeContainer}
39+
textStyle={styles.text}
40+
hljsStyle={hljsStyle}
41+
language="typescript"
42+
>
43+
{CODE_STR}
44+
</CodeHighlighter>
4745
);
4846
}
4947

5048
const styles = StyleSheet.create({
5149
codeContainer: {
52-
paddingHorizontal: 16,
50+
padding: 16,
5351
minWidth: "100%",
5452
},
53+
text: {
54+
fontSize: 16,
55+
},
5556
});

0 commit comments

Comments
 (0)