Bluesky app fork with some witchin' additions 馃挮
witchsky.app
bluesky
fork
client
1import {View} from 'react-native'
2import {msg} from '@lingui/core/macro'
3import {useLingui} from '@lingui/react'
4import {Trans} from '@lingui/react/macro'
5
6import {atoms as a, useTheme} from '#/alf'
7import {Button, ButtonIcon, ButtonText} from '#/components/Button'
8import {ArrowRotateCounterClockwise_Stroke2_Corner0_Rounded as ArrowRotateIcon} from '#/components/icons/ArrowRotate'
9import {MediaInsetBorder} from '#/components/MediaInsetBorder'
10import {Text as TypoText} from '#/components/Typography'
11
12export function Container({children}: {children: React.ReactNode}) {
13 const t = useTheme()
14 return (
15 <View
16 style={[
17 a.flex_1,
18 t.atoms.bg_contrast_25,
19 a.justify_center,
20 a.align_center,
21 a.px_lg,
22 a.rounded_md,
23 a.overflow_hidden,
24 a.gap_lg,
25 ]}>
26 {children}
27 <MediaInsetBorder />
28 </View>
29 )
30}
31
32export function Text({children}: {children: React.ReactNode}) {
33 const t = useTheme()
34 return (
35 <TypoText
36 style={[
37 a.text_center,
38 t.atoms.text_contrast_high,
39 a.text_md,
40 a.leading_snug,
41 {maxWidth: 300},
42 ]}>
43 {children}
44 </TypoText>
45 )
46}
47
48export function RetryButton({onPress}: {onPress: () => void}) {
49 const {_} = useLingui()
50
51 return (
52 <Button
53 onPress={onPress}
54 size="small"
55 color="secondary_inverted"
56 label={_(msg`Retry`)}>
57 <ButtonIcon icon={ArrowRotateIcon} />
58 <ButtonText>
59 <Trans>Retry</Trans>
60 </ButtonText>
61 </Button>
62 )
63}