diff --git a/App.js b/App.js
index 9feed7a..4326264 100644
--- a/App.js
+++ b/App.js
@@ -1,26 +1,96 @@
-import { useEffect } from 'react';
-import { StyleSheet, Text, View } from 'react-native';
+import { useEffect, useState } from 'react';
+import { KeyboardAvoidingView, Platform, Pressable, StyleSheet, Switch, Text, TextInput, View } from 'react-native';
-import { backgroundColor, titleColor } from './theme';
+import {
+ accentColor,
+ backgroundColor,
+ buttonColor,
+ buttonTextColor,
+ darkAccentColor,
+ darkTextColor,
+ inputBorderColor,
+ mutedColor,
+ textColor,
+ titleColor,
+} from './theme';
if (__DEV__) console.info('[stim:readiness] pending');
export default function App() {
+ const [count, setCount] = useState(0);
+ const [dark, setDark] = useState(false);
+ const [name, setName] = useState('');
+
useEffect(() => {
console.log(`[stim:tutorial] started title=${titleColor} background=${backgroundColor}`);
if (__DEV__) console.info('[stim:readiness] ready');
}, []);
return (
-
+
Stim Tutorial
- Edit theme.js and save.
-
+ Edit theme.js and save.
+
+
+
+ Tapped {count} {count === 1 ? 'time' : 'times'}
+
+
+ Hello, {name.trim() || 'world'}
+
+
+
+ setCount((n) => n + 1)}
+ style={({ pressed }) => [styles.button, { backgroundColor: buttonColor, opacity: pressed ? 0.7 : 1 }]}
+ >
+ Tap me
+
+
+
+ Dark accent
+
+
+
+
+
);
}
const styles = StyleSheet.create({
container: { flex: 1, alignItems: 'center', justifyContent: 'center', padding: 24 },
title: { fontSize: 44, fontWeight: '700', marginBottom: 8 },
- subtitle: { fontSize: 16, color: '#6b7280' },
+ subtitle: { fontSize: 16 },
+ card: { alignSelf: 'stretch', borderRadius: 12, padding: 16, marginTop: 32, gap: 4 },
+ cardText: { fontSize: 18 },
+ button: { alignSelf: 'stretch', borderRadius: 12, paddingVertical: 14, marginTop: 16, alignItems: 'center' },
+ buttonText: { fontSize: 18, fontWeight: '600' },
+ row: { alignSelf: 'stretch', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginTop: 16 },
+ label: { fontSize: 18 },
+ input: { alignSelf: 'stretch', borderWidth: 1, borderRadius: 12, padding: 12, fontSize: 18, marginTop: 16 },
});
diff --git a/theme.js b/theme.js
index 4067899..9b16e27 100644
--- a/theme.js
+++ b/theme.js
@@ -1,2 +1,11 @@
export const titleColor = '#1f2937';
export const backgroundColor = '#ffffff';
+
+export const buttonColor = '#2563eb';
+export const buttonTextColor = '#ffffff';
+export const accentColor = '#e0e7ff';
+export const darkAccentColor = '#312e81';
+export const inputBorderColor = '#d1d5db';
+export const textColor = '#1f2937';
+export const mutedColor = '#6b7280';
+export const darkTextColor = '#ffffff';