mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
1import {StyleSheet, View} from 'react-native'
2
3import {usePalette} from '#/lib/hooks/usePalette'
4import {InfoCircleIcon} from '#/lib/icons'
5import {Text} from '#/view/com/util/text/Text'
6import {atoms as a, useTheme} from '#/alf'
7
8export function PostPlaceholder({children}: {children: React.ReactNode}) {
9 const t = useTheme()
10 const pal = usePalette('default')
11 return (
12 <View
13 style={[styles.errorContainer, a.border, t.atoms.border_contrast_low]}>
14 <InfoCircleIcon size={18} style={pal.text} />
15 <Text type="lg" style={pal.text}>
16 {children}
17 </Text>
18 </View>
19 )
20}
21
22const styles = StyleSheet.create({
23 errorContainer: {
24 flexDirection: 'row',
25 alignItems: 'center',
26 gap: 4,
27 borderRadius: 8,
28 marginTop: 8,
29 paddingVertical: 14,
30 paddingHorizontal: 14,
31 borderWidth: StyleSheet.hairlineWidth,
32 },
33})