Commit 65bc5a60 authored by Javokhir's avatar Javokhir
Browse files

fix(example): pin demo colors so the screen is readable in dark mode

The demo hardcoded light-theme colors with no explicit background, so on a
device in dark mode the title and input text rendered dark-on-dark.
parent 44516365
...@@ -138,14 +138,23 @@ function Field({ ...@@ -138,14 +138,23 @@ function Field({
onChangeText={onChangeText} onChangeText={onChangeText}
autoCapitalize="none" autoCapitalize="none"
autoCorrect={false} autoCorrect={false}
placeholderTextColor="#999"
/> />
</View> </View>
); );
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { padding: 24, gap: 16, paddingTop: 72 }, // Colors are pinned rather than theme-aware: the SDK's own UI is light, so a
title: { fontSize: 28, fontWeight: '700', marginBottom: 8 }, // dark demo shell around it would be inconsistent anyway.
container: {
padding: 24,
gap: 16,
paddingTop: 72,
backgroundColor: '#fff',
flexGrow: 1,
},
title: { fontSize: 28, fontWeight: '700', marginBottom: 8, color: '#111' },
field: { gap: 6 }, field: { gap: 6 },
label: { fontSize: 13, color: '#555' }, label: { fontSize: 13, color: '#555' },
input: { input: {
...@@ -155,6 +164,8 @@ const styles = StyleSheet.create({ ...@@ -155,6 +164,8 @@ const styles = StyleSheet.create({
paddingHorizontal: 12, paddingHorizontal: 12,
paddingVertical: 10, paddingVertical: 10,
fontSize: 15, fontSize: 15,
color: '#111',
backgroundColor: '#fff',
}, },
row: { flexDirection: 'row', gap: 8 }, row: { flexDirection: 'row', gap: 8 },
chip: { chip: {
...@@ -178,6 +189,6 @@ const styles = StyleSheet.create({ ...@@ -178,6 +189,6 @@ const styles = StyleSheet.create({
buttonText: { color: '#fff', fontSize: 16, fontWeight: '600' }, buttonText: { color: '#fff', fontSize: 16, fontWeight: '600' },
error: { color: '#c0392b', fontSize: 14 }, error: { color: '#c0392b', fontSize: 14 },
result: { gap: 12, alignItems: 'center' }, result: { gap: 12, alignItems: 'center' },
resultCode: { fontSize: 16, fontWeight: '600' }, resultCode: { fontSize: 16, fontWeight: '600', color: '#111' },
portrait: { width: 180, height: 180, borderRadius: 12 }, portrait: { width: 180, height: 180, borderRadius: 12 },
}); });
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment