theming + material you

This commit is contained in:
Boof2015
2026-07-06 20:38:42 -04:00
parent e1f99f6d61
commit efd2ebc91a
87 changed files with 1528 additions and 327 deletions
+8 -4
View File
@@ -14,10 +14,10 @@ import { useLocalSearchParams, useRouter } from 'expo-router';
import { Screen } from '@/components/Screen';
import { Text } from '@/components/Text';
import {
colors,
radius,
spacing
spacing,
} from '@/theme';
import { createThemedStyles, useColors } from '@/theme/themed';
import { useRemoteSourcesStore } from '@/stores/remoteSourcesStore';
import type { RemoteSourceType } from '@/types/remote';
@@ -60,6 +60,8 @@ function Field({
autoCapitalize = 'none',
keyboardType = 'default',
}: FieldProps) {
const styles = useStyles();
const colors = useColors();
return (
<View style={styles.field}>
<Text variant="label" color={colors.textTertiary} style={styles.fieldLabel}>
@@ -81,6 +83,8 @@ function Field({
}
export default function SourceEditScreen() {
const styles = useStyles();
const colors = useColors();
const router = useRouter();
const { id } = useLocalSearchParams<{ id?: string }>();
const sources = useRemoteSourcesStore((s) => s.sources);
@@ -308,7 +312,7 @@ export default function SourceEditScreen() {
);
}
const styles = StyleSheet.create({
const useStyles = createThemedStyles((colors) => ({
flex: { flex: 1 },
header: {
flexDirection: 'row',
@@ -403,4 +407,4 @@ const styles = StyleSheet.create({
buttonDisabled: {
opacity: 0.5,
},
});
}));
+6 -4
View File
@@ -12,10 +12,10 @@ import { Screen } from '@/components/Screen';
import { Text } from '@/components/Text';
import { ActionSheet, type ActionSheetItem } from '@/components/sheets/ActionSheet';
import {
colors,
radius,
spacing
spacing,
} from '@/theme';
import { createThemedStyles, useColors } from '@/theme/themed';
import { useRemoteSourcesStore } from '@/stores/remoteSourcesStore';
import type { RemoteSourceRow, RemoteSyncProgress } from '@/types/remote';
@@ -38,6 +38,8 @@ function statusLine(
}
export default function SourcesScreen() {
const styles = useStyles();
const colors = useColors();
const router = useRouter();
const sources = useRemoteSourcesStore((s) => s.sources);
const progressById = useRemoteSourcesStore((s) => s.progressById);
@@ -196,7 +198,7 @@ export default function SourcesScreen() {
);
}
const styles = StyleSheet.create({
const useStyles = createThemedStyles((colors) => ({
header: {
flexDirection: 'row',
alignItems: 'center',
@@ -274,4 +276,4 @@ const styles = StyleSheet.create({
rowName: {
flex: 1,
},
});
}));