import { useState } from 'react'; import { StyleSheet, Text, View } from 'react-native'; import { FormField, Switch } from '@/components/form'; import { Screen } from '@/components/ui/Screen'; import { colors } from '@/theme/colors'; import { spacing } from '@/theme/spacing'; import { typography } from '@/theme/typography'; export default function SwitchDemoScreen() { const [pushEnabled, setPushEnabled] = useState(true); const [weeklyDigestEnabled, setWeeklyDigestEnabled] = useState(false); return ( DESIGN SYSTEM · SWITCH Demos du composant Switch Activer les alertes de nouveaux événements {pushEnabled ? 'Activé' : 'Désactivé'} Recevoir un recap chaque lundi {weeklyDigestEnabled ? 'Activé' : 'Désactivé'} Mode maintenance Indisponible ); } const styles = StyleSheet.create({ content: { gap: spacing[16], paddingTop: spacing[24], }, header: { gap: spacing[8], marginBottom: spacing[8], }, kicker: { ...typography.sectionLabel, color: colors.textSecondary, }, title: { ...typography.body, color: colors.textPrimary, }, switchRow: { minHeight: 56, borderWidth: 1, borderColor: colors.inputBorder, borderRadius: 14, backgroundColor: colors.inputBackground, paddingHorizontal: 14, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', gap: spacing[12], }, switchLabelWrap: { flex: 1, gap: 2, }, switchLabel: { ...typography.body, color: colors.textPrimary, }, switchHint: { ...typography.caption, color: colors.textSecondary, }, });