Live video on the AT Protocol

feat: update title without notifying users

Natalie B 85ef3d6e 8f508e5f

+52
+52
js/app/components/button-selector.tsx
··· 1 + import { YStack, XStack, Text, Button, View, YStackProps } from "tamagui"; 2 + 3 + export default function ButtonSelector({ 4 + text, 5 + values, 6 + selectedValue, 7 + setSelectedValue, 8 + ...props 9 + }: { 10 + text?: string; 11 + values: { label: string; value: string }[]; 12 + selectedValue: string; 13 + setSelectedValue: (value: any) => void; 14 + } & YStackProps) { 15 + return ( 16 + <YStack ai="flex-start" gap="$2" pt="$2" {...props}> 17 + {text && ( 18 + <Text fontSize="$base" fontWeight="semibold"> 19 + {text} 20 + </Text> 21 + )} 22 + <XStack 23 + ai="center" 24 + jc="space-around" 25 + gap="$1" 26 + w="100%" 27 + bg="$background" 28 + borderRadius="$xl" 29 + > 30 + {values.map(({ label, value }) => ( 31 + <Button 32 + key={value} 33 + onPress={() => setSelectedValue(value)} 34 + f={1} 35 + height="$2" 36 + variant={selectedValue === value ? "outlined" : undefined} 37 + > 38 + <Text 39 + color={ 40 + selectedValue === value 41 + ? "$color.foreground" 42 + : "$color.mutedForeground" 43 + } 44 + > 45 + {label} 46 + </Text> 47 + </Button> 48 + ))} 49 + </XStack> 50 + </YStack> 51 + ); 52 + }