diff --git a/src/app/_layout.tsx b/src/app/_layout.tsx index 9b2ed88..7c70c95 100644 --- a/src/app/_layout.tsx +++ b/src/app/_layout.tsx @@ -4,6 +4,7 @@ import * as SplashScreen from 'expo-splash-screen'; import * as SystemUI from 'expo-system-ui'; import { useEffect } from 'react'; import { StatusBar } from 'react-native'; +import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { SafeAreaProvider } from 'react-native-safe-area-context'; import { queryClient } from '../hooks/queryClient'; @@ -36,24 +37,25 @@ export default function RootLayout() { if (!ready) return null; return ( - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + ); } diff --git a/src/app/switch-demo.tsx b/src/app/switch-demo.tsx index 0df5628..23c8d2e 100644 --- a/src/app/switch-demo.tsx +++ b/src/app/switch-demo.tsx @@ -1,8 +1,9 @@ import { useState } from 'react'; import { StyleSheet, Text, View } from 'react-native'; +import { Button } from '@/components/Button'; import { FormField, Switch } from '@/components/form'; -import { Screen } from '@/components/ui/Screen'; +import { RangeSlider, Screen, Slider } from '@/components/ui'; import { colors } from '@/theme/colors'; import { spacing } from '@/theme/spacing'; import { typography } from '@/theme/typography'; @@ -10,12 +11,24 @@ import { typography } from '@/theme/typography'; export default function SwitchDemoScreen() { const [pushEnabled, setPushEnabled] = useState(true); const [weeklyDigestEnabled, setWeeklyDigestEnabled] = useState(false); + const [locationEnabled, setLocationEnabled] = useState(true); + const [autoPlayEnabled, setAutoPlayEnabled] = useState(false); + const [radiusKm, setRadiusKm] = useState(25); + const [resultCount, setResultCount] = useState(128); + const [priceRange, setPriceRange] = useState<[number, number]>([0, 65]); + + const formatKm = (v: number) => `${v} km`; + const formatChf = (v: number) => `${v} CHF`; + const formatPriceRange = (minValue: number, maxValue: number) => { + const left = minValue === 0 ? 'Gratuit' : `${minValue} CHF`; + return `${left} - ${maxValue} CHF`; + }; return ( - DESIGN SYSTEM · SWITCH - Demos du composant Switch + DESIGN SYSTEM · SWITCH & SLIDER + Demos phase 4 + + + + + Localisation precise + + + + + Lecture auto des extraits + + + + +