-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
executable file
·35 lines (31 loc) · 744 Bytes
/
App.js
File metadata and controls
executable file
·35 lines (31 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import * as React from "react";
import { StyleSheet, Text, View } from "react-native";
import Constants from "expo-constants";
import CodeEditor, { themes, parsers } from "./editor";
const parser = parsers.python();
export default function App() {
const [code, setCode] = React.useState();
return (
<View style={styles.container}>
<CodeEditor
code={code}
parser={parser}
theme={themes.Monokai}
onChangeCode={setCode}
style={styles.editor}
autofocus
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
paddingTop: Constants.statusBarHeight,
backgroundColor: "#ecf0f1",
alignItems: "stretch"
},
editor: {
flex: 1
}
});