From 8b2c4a38a461ff5ecc95972291bc711e2c5dec9a Mon Sep 17 00:00:00 2001
From: 简律纯 <hsiangnianian@outlook.com>
Date: Fri, 28 Apr 2023 01:47:57 +0800
Subject:

---
 .../packages/ui/src/button.tsx                     | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 examples/with-react-native-web/packages/ui/src/button.tsx

(limited to 'examples/with-react-native-web/packages/ui/src/button.tsx')

diff --git a/examples/with-react-native-web/packages/ui/src/button.tsx b/examples/with-react-native-web/packages/ui/src/button.tsx
new file mode 100644
index 0000000..a94f4ec
--- /dev/null
+++ b/examples/with-react-native-web/packages/ui/src/button.tsx
@@ -0,0 +1,37 @@
+import * as React from "react";
+import {
+  TouchableOpacity,
+  StyleSheet,
+  GestureResponderEvent,
+  Text,
+} from "react-native";
+
+export interface ButtonProps {
+  text: string;
+  onClick?: (event: GestureResponderEvent) => void;
+}
+
+export function Button({ text, onClick }: ButtonProps) {
+  return (
+    <TouchableOpacity style={styles.button} onPress={onClick}>
+      <Text style={styles.text}>{text}</Text>
+    </TouchableOpacity>
+  );
+}
+
+const styles = StyleSheet.create({
+  button: {
+    maxWidth: 200,
+    textAlign: "center",
+    borderRadius: 10,
+    paddingTop: 14,
+    paddingBottom: 14,
+    paddingLeft: 30,
+    paddingRight: 30,
+    fontSize: "15px",
+    backgroundColor: "#2f80ed",
+  },
+  text: {
+    color: "white",
+  },
+});
-- 
cgit v1.2.3-70-g09d2

