expo-popcore-app/components/skeleton/SearchWorksSkeleton.tsx

54 lines
1.4 KiB
TypeScript

import { View, StyleSheet } from 'react-native'
import { Skeleton } from './skeleton'
export function SearchWorksSkeleton() {
return (
<View style={styles.container}>
{/* 搜索历史骨架 */}
<View style={styles.historySection}>
<View style={styles.historyHeader}>
<Skeleton width={80} height={18} borderRadius={4} />
<Skeleton width={20} height={20} borderRadius={4} />
</View>
<View style={styles.historyTags}>
{[1, 2, 3, 4].map((item) => (
<Skeleton
key={item}
width={80}
height={29}
borderRadius={100}
style={styles.historyTag}
/>
))}
</View>
</View>
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#090A0B',
paddingHorizontal: 12,
},
historySection: {
paddingBottom: 32,
},
historyHeader: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
historyTags: {
flexDirection: 'row',
flexWrap: 'wrap',
gap: 4,
marginTop: 16,
},
historyTag: {
marginBottom: 0,
},
})