summaryrefslogtreecommitdiff
path: root/components/login
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-07-16 09:58:34 +0700
committerpolwex <polwex@sortug.com>2025-07-16 09:58:34 +0700
commitdc0ad21f0e857adb87d710dd0f2f9affd0a9cbc9 (patch)
tree3d556ead415654e03b511b007365bcdff6d612ee /components/login
parent697ed671f394cbd07ea9751fe17f262744d99a49 (diff)
kinda works
Diffstat (limited to 'components/login')
-rw-r--r--components/login/ShipCredsForm.tsx105
1 files changed, 105 insertions, 0 deletions
diff --git a/components/login/ShipCredsForm.tsx b/components/login/ShipCredsForm.tsx
new file mode 100644
index 0000000..15712c2
--- /dev/null
+++ b/components/login/ShipCredsForm.tsx
@@ -0,0 +1,105 @@
+"use client";
+import { ColorScheme, lightColors } from "@/constants";
+import { BottomTabBarButtonProps } from "@react-navigation/bottom-tabs";
+import {
+ StyleSheet,
+ TextInput,
+ TouchableOpacity,
+ View,
+ Text,
+} from "react-native";
+import PrimaryButton from "../PrimaryButton";
+import { useState } from "react";
+
+export function ShipForm() {
+ const colors = lightColors;
+ const styles = getStyles(colors);
+ const [patp, setPatp] = useState("~mirtyl-wacdec");
+ const [ticket, setTicket] = useState("~posseg-winnub-fogluc-dirmes");
+ const [isLoading, setIsLoading] = useState(false);
+ async function onSubmit() {
+ console.log({ patp, ticket });
+ }
+ return (
+ <View style={styles.bottomSection}>
+ <TextInput
+ style={styles.input}
+ placeholder="~sampel-palnet"
+ placeholderTextColor={colors.secondary}
+ value={patp}
+ onChangeText={setPatp}
+ autoCapitalize="none"
+ autoCorrect={false}
+ />
+ <TextInput
+ style={styles.input}
+ placeholder="~sampel-ticlyt-migfun-falmel"
+ placeholderTextColor={colors.secondary}
+ value={ticket}
+ onChangeText={setTicket}
+ autoCapitalize="none"
+ autoCorrect={false}
+ secureTextEntry
+ />
+
+ <PrimaryButton
+ label="Log in"
+ onPress={onSubmit}
+ style={{ marginTop: 0 }}
+ isLoading={isLoading}
+ />
+
+ <TouchableOpacity style={styles.footer}>
+ <Text style={styles.footerText}>No Urbit ID? Get yours.</Text>
+ </TouchableOpacity>
+ </View>
+ );
+}
+export const getStyles = (colors: ColorScheme) =>
+ StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: colors.background,
+ justifyContent: "space-between",
+ padding: 20,
+ },
+ topSection: {
+ flex: 1,
+ justifyContent: "center",
+ alignItems: "center",
+ },
+ walletIcon: {
+ width: 64,
+ height: 64,
+ marginBottom: 12,
+ },
+ logoText: {
+ fontSize: 18,
+ color: colors.text,
+ fontWeight: "400",
+ },
+ bottomSection: {
+ gap: 8,
+ marginBottom: 40,
+ },
+ input: {
+ height: 48,
+ backgroundColor: colors.card,
+ borderColor: colors.border,
+ borderWidth: 1,
+ borderRadius: 8,
+ paddingHorizontal: 16,
+ paddingVertical: 12,
+ color: colors.text,
+ fontWeight: "500",
+ fontSize: 16,
+ },
+ footer: {
+ marginTop: 50,
+ alignItems: "center",
+ },
+ footerText: {
+ color: colors.text,
+ fontSize: 16,
+ },
+ });