add switch theme, remove unneeded search bar context

This commit is contained in:
Jorrin
2024-03-23 16:29:28 +01:00
parent 7308eb2221
commit 4ec78b13ab
10 changed files with 169 additions and 186 deletions

View File

@@ -11,7 +11,6 @@ import {
Select,
Separator,
Sheet,
Switch,
Text,
useTheme,
View,
@@ -21,6 +20,7 @@ import {
import type { ThemeStoreOption } from "~/stores/theme";
import ScreenLayout from "~/components/layout/ScreenLayout";
import { MWSwitch } from "~/components/ui/Switch";
import { checkForUpdate } from "~/lib/update";
import { getGestureControls, saveGestureControls } from "~/settings";
import { useThemeStore } from "~/stores/theme";
@@ -76,14 +76,12 @@ export default function SettingsScreen() {
<XStack width={200} alignItems="center" gap="$4">
<Label minWidth={110}>Gesture controls</Label>
<Separator minHeight={20} vertical />
<Switch
size="$4"
native
<MWSwitch
checked={gestureControlsEnabled}
onCheckedChange={handleGestureControlsToggle}
>
<Switch.Thumb animation="quicker" />
</Switch>
<MWSwitch.Thumb animation="quicker" />
</MWSwitch>
</XStack>
</YStack>
</View>