forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
74 lines (74 loc) · 2.23 KB
/
Copy pathApp.js
File metadata and controls
74 lines (74 loc) · 2.23 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import React, { useState } from 'react';
import { StyleSheet, Text, View, TouchableOpacity, SafeAreaView } from 'react-native';
import { echo } from '../src';
export default function App() {
const [response, setResponse] = useState(null);
const handlePress = () => {
const result = echo('Hello Omi!');
setResponse(result);
};
return (React.createElement(SafeAreaView, { style: styles.container },
React.createElement(View, { style: styles.content },
React.createElement(Text, { style: styles.title }, "Omi SDK Example"),
React.createElement(TouchableOpacity, { style: styles.button, onPress: handlePress },
React.createElement(Text, { style: styles.buttonText }, "Say Hello")),
response && (React.createElement(View, { style: styles.responseContainer },
React.createElement(Text, { style: styles.responseTitle }, "Response:"),
React.createElement(Text, { style: styles.responseText }, response))))));
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f5f5f5',
},
content: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
padding: 20,
},
title: {
fontSize: 24,
fontWeight: 'bold',
marginBottom: 40,
color: '#333',
},
button: {
backgroundColor: '#007AFF',
paddingVertical: 12,
paddingHorizontal: 30,
borderRadius: 25,
elevation: 3,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.1,
shadowRadius: 4,
},
buttonText: {
color: 'white',
fontSize: 16,
fontWeight: '600',
},
responseContainer: {
marginTop: 40,
padding: 20,
backgroundColor: 'white',
borderRadius: 10,
width: '100%',
shadowColor: '#000',
shadowOffset: { width: 0, height: 1 },
shadowOpacity: 0.1,
shadowRadius: 3,
elevation: 2,
},
responseTitle: {
fontSize: 16,
fontWeight: '600',
marginBottom: 10,
color: '#555',
},
responseText: {
fontSize: 16,
color: '#333',
},
});