From da2bdf5d6f84ed726fb131f00fac5ef458be6f7e Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Thu, 16 May 2024 16:57:07 +0100
Subject: [🐴] use Toggle component in settings screen (#4048)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* use Toggle component

* nits + notifs sounds native only
---
 src/components/RadioGroup.tsx | 76 -------------------------------------------
 1 file changed, 76 deletions(-)
 delete mode 100644 src/components/RadioGroup.tsx

(limited to 'src/components/RadioGroup.tsx')

diff --git a/src/components/RadioGroup.tsx b/src/components/RadioGroup.tsx
deleted file mode 100644
index 010f65bc3..000000000
--- a/src/components/RadioGroup.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-import React from 'react'
-import {View, ViewProps} from 'react-native'
-
-import {atoms as a, useTheme} from '#/alf'
-import {Button} from './Button'
-import {Text} from './Typography'
-
-export function RadioGroup<T extends string | number>({
-  value,
-  onSelect,
-  items,
-  ...props
-}: ViewProps & {
-  value: T
-  onSelect: (value: T) => void
-  items: Array<{label: string; value: T}>
-}) {
-  return (
-    <View {...props}>
-      {items.map(item => (
-        <Button
-          label={item.label}
-          key={item.value}
-          variant="ghost"
-          color="secondary"
-          size="small"
-          onPress={() => onSelect(item.value)}
-          style={[a.justify_between, a.px_sm]}>
-          <Text style={a.text_md}>{item.label}</Text>
-          <RadioIcon selected={value === item.value} />
-        </Button>
-      ))}
-    </View>
-  )
-}
-
-function RadioIcon({selected}: {selected: boolean}) {
-  const t = useTheme()
-  return (
-    <View
-      style={[
-        {
-          width: 30,
-          height: 30,
-          borderWidth: 2,
-          borderColor: selected
-            ? t.palette.primary_500
-            : t.palette.contrast_200,
-        },
-        selected
-          ? {
-              backgroundColor:
-                t.name === 'light'
-                  ? t.palette.primary_100
-                  : t.palette.primary_900,
-            }
-          : t.atoms.bg,
-        a.align_center,
-        a.justify_center,
-        a.rounded_full,
-      ]}>
-      {selected && (
-        <View
-          style={[
-            {
-              width: 18,
-              height: 18,
-              backgroundColor: t.palette.primary_500,
-            },
-            a.rounded_full,
-          ]}
-        />
-      )}
-    </View>
-  )
-}
-- 
cgit 1.4.1

