Bluesky app fork with some witchin' additions 馃挮
at readme-update 33 lines 1.0 kB view raw
1import {View} from 'react-native' 2import {msg} from '@lingui/macro' 3import {useLingui} from '@lingui/react' 4 5import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 6import {atoms as a, useTheme, type ViewStyleProp} from '#/alf' 7import {Button, ButtonIcon} from '#/components/Button' 8import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times' 9 10export function ExternalEmbedRemoveBtn({ 11 onRemove, 12 style, 13}: {onRemove: () => void} & ViewStyleProp) { 14 const t = useTheme() 15 const {_} = useLingui() 16 17 const enableSquareButtons = useEnableSquareButtons() 18 19 return ( 20 <View style={[a.absolute, {top: 8, right: 8}, a.z_50, style]}> 21 <Button 22 label={_(msg`Remove attachment`)} 23 onPress={onRemove} 24 size="small" 25 variant="solid" 26 color="secondary" 27 shape={enableSquareButtons ? 'square' : 'round'} 28 style={[t.atoms.shadow_sm]}> 29 <ButtonIcon icon={X} size="sm" /> 30 </Button> 31 </View> 32 ) 33}