This commit is contained in:
2025-02-08 22:40:36 -08:00
parent 09b3508a72
commit 89eadbd477
70 changed files with 9585 additions and 2783 deletions
+32 -15
View File
@@ -1,20 +1,37 @@
"use client";
import * as React from "react";
import {
StyleSheet,
GestureResponderEvent,
Text,
Pressable,
} from "react-native";
import { ReactNode } from "react";
interface ButtonProps {
children: ReactNode;
className?: string;
appName: string;
export interface ButtonProps {
text: string;
onClick?: (event: GestureResponderEvent) => void;
}
export const Button = ({ children, className, appName }: ButtonProps) => {
export function Button({ text, onClick }: ButtonProps) {
return (
<button
className={className}
onClick={() => alert(`Hello from your ${appName} app!`)}
>
{children}
</button>
<Pressable style={styles.button} onPress={onClick}>
<Text style={styles.text}>{text}</Text>
</Pressable>
);
};
}
const styles = StyleSheet.create({
button: {
maxWidth: 200,
textAlign: "center",
borderRadius: 10,
paddingTop: 14,
paddingBottom: 14,
paddingLeft: 30,
paddingRight: 30,
fontSize: 15,
backgroundColor: "#2f80ed",
},
text: {
color: "white",
},
});
+1
View File
@@ -0,0 +1 @@
export { Button, type ButtonProps } from "./button";