about summary refs log tree commit diff
path: root/src/view/com/util/forms/SelectableBtn.tsx
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-02-03 14:18:13 -0800
committerGitHub <noreply@github.com>2025-02-03 22:18:13 +0000
commitfa8607b861e0719d76778aa14af0745313640e33 (patch)
tree7496a49cba6627809be0a4067dde5cca0d8fece0 /src/view/com/util/forms/SelectableBtn.tsx
parent23e62b18de9537b50c8b1df2b4744adc030501d0 (diff)
downloadvoidsky-fa8607b861e0719d76778aa14af0745313640e33.tar.zst
Spring cleaning (#7640)
* delete breakpoint layouts

* delete empty file

* delete legacy radio buttons

* delete selectable button

* rm radio buttons from debug

* delete storage.ts

* delete type-assertions.ts
Diffstat (limited to 'src/view/com/util/forms/SelectableBtn.tsx')
-rw-r--r--src/view/com/util/forms/SelectableBtn.tsx75
1 files changed, 0 insertions, 75 deletions
diff --git a/src/view/com/util/forms/SelectableBtn.tsx b/src/view/com/util/forms/SelectableBtn.tsx
deleted file mode 100644
index 76161b433..000000000
--- a/src/view/com/util/forms/SelectableBtn.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import {Pressable, StyleProp, StyleSheet, ViewStyle} from 'react-native'
-
-import {usePalette} from '#/lib/hooks/usePalette'
-import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
-import {Text} from '../text/Text'
-
-interface SelectableBtnProps {
-  testID?: string
-  selected: boolean
-  label: string
-  left?: boolean
-  right?: boolean
-  onSelect: () => void
-  accessibilityHint?: string
-  style?: StyleProp<ViewStyle>
-}
-
-export function SelectableBtn({
-  testID,
-  selected,
-  label,
-  left,
-  right,
-  onSelect,
-  accessibilityHint,
-  style,
-}: SelectableBtnProps) {
-  const pal = usePalette('default')
-  const palPrimary = usePalette('inverted')
-  const needsWidthStyles = !style || !('width' in style || 'flex' in style)
-  const {isMobile} = useWebMediaQueries()
-  return (
-    <Pressable
-      testID={testID}
-      style={[
-        styles.btn,
-        needsWidthStyles && {
-          flex: isMobile ? 1 : undefined,
-          width: !isMobile ? 100 : undefined,
-        },
-        left && styles.btnLeft,
-        right && styles.btnRight,
-        pal.border,
-        selected ? palPrimary.view : pal.view,
-        style,
-      ]}
-      onPress={onSelect}
-      accessibilityRole="button"
-      accessibilityLabel={label}
-      accessibilityHint={accessibilityHint}>
-      <Text style={selected ? palPrimary.text : pal.text}>{label}</Text>
-    </Pressable>
-  )
-}
-
-const styles = StyleSheet.create({
-  btn: {
-    flexDirection: 'row',
-    justifyContent: 'center',
-    flexGrow: 1,
-    borderWidth: 1,
-    borderLeftWidth: 0,
-    paddingHorizontal: 10,
-    paddingVertical: 10,
-  },
-  btnLeft: {
-    borderTopLeftRadius: 8,
-    borderBottomLeftRadius: 8,
-    borderLeftWidth: 1,
-  },
-  btnRight: {
-    borderTopRightRadius: 8,
-    borderBottomRightRadius: 8,
-  },
-})