mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
fork

Configure Feed

Select the types of activity you want to include in your feed.

at mod-auth 63 lines 1.7 kB view raw
1import * as React from 'react' 2import {View} from 'react-native' 3import {msg} from '@lingui/macro' 4import {useLingui} from '@lingui/react' 5 6import {atoms as a, useTheme} from '#/alf' 7import {Button} from '#/components/Button' 8import {EyeSlash_Stroke2_Corner0_Rounded as EyeSlash} from '#/components/icons/EyeSlash' 9import {Text} from '#/components/Typography' 10 11export function PostThreadShowHiddenReplies({ 12 type, 13 onPress, 14 hideTopBorder, 15}: { 16 type: 'hidden' | 'muted' 17 onPress: () => void 18 hideTopBorder?: boolean 19}) { 20 const {_} = useLingui() 21 const t = useTheme() 22 const label = 23 type === 'muted' ? _(msg`Show muted replies`) : _(msg`Show hidden replies`) 24 25 return ( 26 <Button onPress={onPress} label={label}> 27 {({hovered, pressed}) => ( 28 <View 29 style={[ 30 a.flex_1, 31 a.flex_row, 32 a.align_center, 33 a.gap_sm, 34 a.py_lg, 35 a.px_xl, 36 !hideTopBorder && a.border_t, 37 t.atoms.border_contrast_low, 38 hovered || pressed ? t.atoms.bg_contrast_25 : t.atoms.bg, 39 ]}> 40 <View 41 style={[ 42 t.atoms.bg_contrast_25, 43 a.align_center, 44 a.justify_center, 45 { 46 width: 26, 47 height: 26, 48 borderRadius: 13, 49 marginRight: 4, 50 }, 51 ]}> 52 <EyeSlash size="sm" fill={t.atoms.text_contrast_medium.color} /> 53 </View> 54 <Text 55 style={[t.atoms.text_contrast_medium, a.flex_1]} 56 numberOfLines={1}> 57 {label} 58 </Text> 59 </View> 60 )} 61 </Button> 62 ) 63}